读书人

pthread_join()这个函数具体在什么情况

发布时间: 2012-04-06 12:22:24 作者: rapoo

pthread_join()这个函数具体在什么情况下使用
据说在发送多个线程时,使用pthread_join()后线程是串行发送的,现在要并发线程,是不是要使用这个函数呢?
请教pthread_join()这个函数具体在什么情况下使用,谢谢!!!

[解决办法]
int pthread_join(pthread_t th, void **thread_return);
pthread_join suspends the execution of the calling thread until the thread identified by th terminates, either by calling pthread_exit(3) or by being cancelled.

用来等待指定的线程结束

读书人网 >C++

热点推荐