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.
精彩评论