如果我不关心我的线程的返回状态,我需要有一个pthread_exit吗?
我想知道在我的数据库pthreads中是否存在与不调用pthread_exit相关的一些细微资源问题.
谢谢.
目的pthread_exit()是在连接的任何其他线程返回退出代码.
从手册:
Performing a return from the start function of any thread other than the main
thread results in an implicit call to pthread_exit(), using the function's
return value as the thread's exit status.
Run Code Online (Sandbox Code Playgroud)
所以,如果你不使用它没有任何区别.
| 归档时间: |
|
| 查看次数: |
1240 次 |
| 最近记录: |