We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//只要线程执行pthread_exit(),整个线程就会结束,并且释放占用资源, 为什么还要区分detach模式呢, //感觉没有任何区别呀,高性能服务器 你们一般采用哪个方式
脉脉
The text was updated successfully, but these errors were encountered:
回答: 如果是线程池或者常驻进程 采用join 统一管理, 如果作业类型,detach结束后,不需要进程等待,或者说进程可以自己离开,采用detach
场景1 :类似fork形式 主线程 调用子线程执行job(周期可长可短),main线程调用 pthead_exit() 离开,等待子线程job执行完毕,然后进程在最后推出。必须使用detach
我感觉回答不好,期待你更好的反馈
Sorry, something went wrong.
No branches or pull requests
//只要线程执行pthread_exit(),整个线程就会结束,并且释放占用资源,
为什么还要区分detach模式呢,
//感觉没有任何区别呀,高性能服务器 你们一般采用哪个方式
脉脉
The text was updated successfully, but these errors were encountered: