What is pthread_exit?

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

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

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

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

This is great!! Very well explained. Thank you

samjoseph
Автор

Its an amazing video.Explained with details and really helpful..
Could you also make an video on pthread_cancel

animeshkumarsinha
Автор

Thank you..really awesome.
can you pls do the videos on socket programming?

subbuu
Автор

Is there any difference between returning double/float typed values and other types of value? For some reason, whenever I tried to return a double value, the value inside the address memory at the pointer is zero.

I suspect this behavior occurs because there's some slightly difference between returning a double pointer to values and an integer pointer to values...

exausto
Автор

Hi thanks for the tutorial, i have a quick question.
im using Lunix Ubnutu for this and when i'm not returning anything from the routine function, i get this error msg: warning: no return statement in function returning non-void
i know that it says you need to return something because, we declared the routine as
void *routine(void* args)
what i do for now is that i return something like | return (void*) 2;
just a random value, since im using the routine to print text only.
is there any thing i can do to fix this.
thank you

rouanemouaad
Автор

What is the benefit that you get, having pthread_exit(0) in main function (assume there is no join inside main)?? ..Are we freeing some process memory/ resources (if so, what are they) ?? consider the above example

suneelabbigari
Автор

One question, even If i dont return and try accessing that memory location, i should get the value in main thread. I mean if you can free from main thread, why not access the value.

dsalgos
Автор

Cant we use semaphores do the same task?

mihirjog
Автор

I don't think it is a memory leak. When the process finishes, the OS will deallocate all memory.

nachumdanzig