使用MinGW线程? [英] Using threads with MinGW?
问题描述
我正在建立一个小工具,需要打开一个线程,并让线程做它的事情,不管发生在那个线程,我不想干扰主应用程序,只是执行,处理错误并关闭。
如何使用mingw编译器?在linux上我可以使用POSIX,但是这个工具只能在win,x86和x64上运行,所以我不知道该怎么做。
您可以使用 pthreads-win32 。
为了找到这个,我在Google上搜索pthreads mingw,这是第一个结果。
I am building a small tool that will need to open a thread, and let the thread do its thing, no matter what happens on that thread I don't want it to interfere with the main app, just execute, handle errors and close.
How can I do this with mingw compiler? On linux I can use POSIX, but this tool will run only on win, both x86 and x64, so I've no idea how to do it.
You can use pthreads-win32. It implements most of pthreads functionality using Windows threading API.
To find this, I searched Google for "pthreads mingw" and it was the first result.
这篇关于使用MinGW线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!