c - What does pthread_exit do so that main should call it to prevent other threads from dying prematurely -


http://man7.org/linux/man-pages/man3/pthread_exit.3.html

the man page above not tell why main() should terminate calling pthread_exit, says should. comments appreciated.

the thread executes main special, returning equivalent call exit whole process. kill other threads.

if terminate pthread_exit process keeps running until other threads terminate 1 way or another.

the other alternative give other threads time job join threads created means of pthread_join.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -