What are detached threads?

preview_player
Показать описание
Source code can be found here:

===== Support us through our store =====

===== Check out our website =====

===== Check out our Discord server =====
Рекомендации по теме
Комментарии
Автор

Thank you dude. I got the highest marks in a subject in my uni because of a simple problem only I could tackle. THIS VIDEO HELPED ME A LOT!!!

xrpj
Автор

This man has the power of indian youtube teachers in a white man's body

noapoleon_
Автор

I have a doubt with deached threads here, you told this is done for something which will take long time to execute, so make the thread detached and the main thread exits, in that case the detached thread also will be destroyed rite, when the main thread is terminated. 3:35 - 3:45

ajidaniel
Автор

Great videos, appreciate the efforts.

amanapatel
Автор

About 7:05, If we call pthread_detach in the routine function, will the problem be solved?

怪人-bx
Автор

Thank you.
What is the real time use cases of detached thread?

narasarajv
Автор

"Hi, since you mentioned that using detach() clears the resources, and if we don’t use detach() and join(), the resources won’t be cleared, could you please show me how to verify this? I’ve tried using ps, top, and checking /proc/[pid]/, but I see the same results both before and after using detach(). I expected that with detach(), the resources would be cleared, but they appear the same whether I use detach() or not. How can I check if the resources are being cleared?"

Pankaj_prasad
Автор

Hi ! Kind of a dumb question but could you tell me how to make the functions prototype and short explanation of what they do appear on VSC ? What's the name's extension ? Thank you very much for everything, your videos are very helpful !

orianemv
Автор

What is the default state of thread when created through pthread_create ?
Is it detached or joinable?
If it is detached then, is it required to use pthread_detach when NULL is passed as second argument to pthread_create ?

animeshkumarsinha
Автор

This doesn't seem to work with the MingGW-w64 based toolchain with gcc 13.1.0.

Vivraan
Автор

I ran this exact same code on my Virtual machine, and used Valgrind tool to check for memory leaks. This code leaks memory, can you please tell how to handle memory leaks?

tanmaykothale