Search code examples
windowsvisual-c++pthreadspthreads-win32

Portability of pthreads-win32 over various windows compilers


I'm using pthreads-win32 to allow threading support for windows.

I have a cross platform project that uses pthreads and I want to make it work on windows with various compilers and different OS versions.

At least, according to the documentation pthreads-win32 should work with MSVC and even MSVC builds provided.

But I don't know if the library is tested with latest MSVC compilers like MSVC-2008 and if it is supported under 64bit windows.

From Your own experience are you aware of any issues with this library?

  • Any issues with MSVC8, MSVC9, MSVC10?
  • Any issues with Windows x86_64?
  • Any issues with Windows Vista/Windows 7?

Notes:

  • Do not even try to recommend using Boost.Thread, I'm not interested in. And I'm familiar with Boost.Thread library
  • I'm not interested in reinventing the Wheel with Win32 API (that lacks RW-Locks, Conditional Variables, etc).
  • I did managed to compile a projects with MSVC-2008 and MinGW GCC-4.3 and then run unit tests on it easily, using current pre-compiled DLL of pthreads.

I just need to know limitations of pthreads-win32.


Solution

  • Well, paxdiablo has apparently summed it up here. But from my past experience with this library, I can add a couple of things here.

    Firstly, I had used a subset of the library's functions with MSVC 2008 without any problems whatsoever.

    Secondly, some of my colleagues have got it going on the x86_64 (with MSVC2008 and MinGW). They haven't faced any issue either after many a cycles of beta and QA testing. Though I haven't tested it myself so can't be very sure on this one.

    So by the looks of the things, it might be fit for use. The only caveat here is that if you find any issue you will be at the mercy of a not-so active mailing list (or perhaps you may want to get your hands dirty with the source code or something like that).