So I've already tested some pthreads on this Windows 10 computer and they do function. Upon a little further research, I discovered that apparently MinGW which is what I am using, has some sort of wrapper that maps the pthreads API to whatever it is Windows uses on a Windows system. However, information on this seems pretty scarce and I'm not sure what's really going on under the hood, plus POSIX is supposed to be a *NIX standard rather than Windows. Are pthreads really safe to use on Windows?
Context: Please note that I am not doing Win32 programming in Visual Studio. I am using MinGW & GCC and writing code with Emacs and compiling GCC at the command-line. I'm trying to stay in this environment and avoid Visual Studio if at all possible and I am aware that there is a "Windows API" way of doing this with all of the MS stuff using Visual C++ and all that which I am trying to avoid.
So, is this the best I'm going to get outside of using the Win API stuff? Also, does anyone happen to know how to call the Win API into a program without using Visual Studio? Can I just #include <windows.h> or whatever in a plain GCC program? Or do I have to use Windows' cl.exe compiler or whatever? Thanks so much.
BTW: A similar topic is here . However, this user seems to be programming in C++ and the solution is not the same.