开发者

Using threads with 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 a开发者_C百科nd x64, so I've no idea how to do it.


Unless you want to work directly with Windows threads you'll probably want a cross-platform thread library like pthreads-win32 or boost:thread


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜