June 2017
Intermediate to advanced
478 pages
13h 14m
English
A thread terminates when:
Note that if a multithreaded program calls fork, only the thread that made the call will exist in the new child process. Fork does not replicate all threads.
A thread has a return value, which is a void pointer. One thread can wait for another to terminate and collect its return value by calling pthread_join(2). There is an example in the code for thread-demo, mentioned in the preceding section. This ...
Read now
Unlock full access