pthread_tryjoin_np?有没有Windows版本
pthread_tryjoin_np? Is there a Windows version of it?
pthread_tryjoin_np 是不可移植的。有某种Windows版本吗?创建线程但不阻塞?
在Windows中,CreateThread给你一个HANDLE,你可以等待它来学习线程何时退出 - 这类似于posix平台上的pthread_tryjoin。
要等待超时,或轮询线程退出,这是pthread_tryjoin_np通常执行的操作(_np代表不可移植,因此该函数可能存在各种变体),您可以使用 WaitForSingleObject 和线程的句柄。
虽然不在当前的官方实现中(截至 2012 年 5 月 27 日的 2.9.1),pthread_tryjoin()
在当前的后备箱中 https://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/?cvsroot=pthreads-win32
请参阅此处的更新日志:https://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/pthreads/ChangeLog?rev=1.370&content-type=text/plain&cvsroot=pthreads-win32
你可以像这样使用 CVS 拉取源代码
cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
他们应该使用VC Express或MinGW gcc进行构建。
相关文章:
- 从预处理器获取 Windows 版本(C++ Win32)
- 升级到 Windows 10 版本 1809 SDK 后,我无法编译使用 C++/WinRT 的项目
- 在 c++ 中检查 Windows OS 服务器版本
- 获取Windows版本的正确方法
- 在任何 Windows 版本上全屏显示控制台
- "此版本的 C:\TURBOC3\BIN\TCC.EXE 与您运行的 Windows 版本不兼容。
- 编译windows版本的一厢情愿
- MinGW .h 编译文件不起作用:此文件的版本与您运行的 Windows 版本不兼容
- 面向多个 Windows 版本
- 如何根据windows版本正确加载GetMappedFileName
- 通过应用程序确定Windows版本
- pthread_tryjoin_np?有没有Windows版本
- 获取Windows版本
- 基于windows版本的c++条件编译
- 获取Windows版本字符串C++
- NDIS 版本和 Windows 版本之间的兼容性问题
- 如何在CMake中检查Windows版本
- Windows 10 home的c++ Windows版本问题
- 如何检查Windows版本是否为正版
- 使用gcc c++获取Windows版本