In Solaris, thr_join documentation states the following:
int thr_join(thread_t thread, thread_t *departed, void
**status);
If the target thread ID is 0, thr_join() finds and returns
the status of a terminated undetached thread in the process.
Is POSIX pthread_join
equivalent?
int pthread_join(pthread_t thread, void **status);
suspends processing of the calling thread until the target thread completes How can I use pthread_join in case of thr_join when I would like to know which child thread have terminated among many. Is there any other alternative? In other words, if a parent thread spawns N child threads, how do the parent thread know by polling or something else which thread has exited / terminated?