c++ - 如何在 Windows C++ 上分离线程

标签 c++ windows multithreading

如何在 C++ 中分离 Windows 上的线程。在 Posix 上,我们有 pthread_detach(pthread_self());。如何在windows环境下实现。

最佳答案

假设您使用的是 _beginthreadexCreateThread 创建线程,您只需要使用 CloseHandle 关闭线程句柄.

关于c++ - 如何在 Windows C++ 上分离线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12744324/

相关文章:

windows - 从 Windows 共享 checkout

C# BackgroundWorker 循环回问题

c++ - 是否有必要在互斥锁上调用 pthread_mutex_destroy?

c++ - boost 分配 : using objects with map_list_of?

c++ - 读取构造函数的 R 列表会引发错误 : expecting a single value

windows - 在 powershell 中检查时区的语言独立方式?

c++ - 不能使用值但引用和指针的多态性的原因

c++ - 在Windows环境下如何知道我的USB设备的驱动程序已加载?

Python 3 - 托管服务器

c# - 如何在尝试删除文件时调试 "Sharing Violation"