pthread_exit

main中调用pthread_exit(),这样进程就必须等待所有的线程终止后才能退出

如果你希望初始线程终止时,其他线程继续执行,需要在初始线程中调用pthread_exit(),而不是从main()函数中返回。

原文地址:https://www.cnblogs.com/xpylovely/p/11393102.html