我正在Windows上安装mingw-w64,有两个选项:win32 threads和posix threads。我知道win32 threads和pthreads之间的区别,但我不明白这两个选项之间的区别。我怀疑如果我选择posix threads,则无法调用像CreateThread这样的WinAPI函数。
似乎此选项指定某个程序或库将使用哪个线程API,但是由谁来指定?由GCC、libstdc++还是其他什么?
我找到了这个: Whats the difference between thread_posixs and thread_win32 in gcc port of windows? 简而言之,对于mingw的这个版本,threads-posix发布将使用posix API并允许使用std::thread,threads-win32将使用win32 API,并禁用标准中的std::thread部分。
如果我选择win32 threads,则std :: thread将不可用,但win32 threads仍将被使用。但是被什么使用?
似乎此选项指定某个程序或库将使用哪个线程API,但是由谁来指定?由GCC、libstdc++还是其他什么?
我找到了这个: Whats the difference between thread_posixs and thread_win32 in gcc port of windows? 简而言之,对于mingw的这个版本,threads-posix发布将使用posix API并允许使用std::thread,threads-win32将使用win32 API,并禁用标准中的std::thread部分。
如果我选择win32 threads,则std :: thread将不可用,但win32 threads仍将被使用。但是被什么使用?