1
在Solaris中,thr_join文件規定如下:的Solaris thr_join VS POSIX在pthread_join
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.
是POSIX pthread_join
等同?
int pthread_join(pthread_t thread, void **status);
,直到目標線程完成 如何使用在pthread_join在thr_join的情況下,我想知道哪些子線程中許多已經終止掛起調用線程的處理。 有沒有其他的選擇? 換句話說,如果一個父線程產生N個子線程,那麼父線程如何通過輪詢或其他線程知道哪個線程已退出/終止?