0

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.

opresas
  • 3
  • 1
  • 2

2 Answers2

3

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

SpliFF
  • 37,036
  • 16
  • 86
  • 116
1

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.

kichik
  • 30,658
  • 6
  • 82
  • 103