Hi,

To add a bit to Ruben's answer.
Winpthreads is a library designed to provide pthread's API and its
typical ABI since many software assume pthread_t is an integer (it's the
case on Linux and many other OSes).
Pthreads-win32 has a different ABI where pthread_t is a struct instead
(as far as I remember, in winpthreads, the integer is used to lookup the
actual struct). I don't know how the performance of the two compare but
I've already had cases where that ABI was assumed and winpthreads'
approach basically saved the day.

I haven't heard many complaints about its stability either but I've read
several posts about it having a lower performance. In other words: it
works but it's not as fast as it could be, and obviously there are
always more things to do than people can spend time on. I think we also
didn't get many real-world benchmarks showing there's a performance
issue and that made it more difficult to improve winpthreads.

The relicensing of "mingw-std-threads" happened only a few weeks ago and
I don't think anyone has been able to spend time on it (no-one had
looked at it in-depth before because the license made it unusable for
mingw-w64).
Having a real-world usage and motivation, it would be really great if
you were able to spend some time on improving winpthreads (maybe even
beating MSVC as is done with the math library :) ). Version 4 of
mingw-w64 is about to be released and such changes will therefore only
be in version 5 but that also means it's the right time to introduce
large changes (plus the time between major releases is getting much
smaller: 5 isn't that far away either).

I've just spent some more time looking at winpthreads and it's slightly
more complex than "it uses kernel objects while it should use userland
ones" because both are used and it would be valuable to have at least a
profile with winpthreads to see which branches are taken in practice.

Regards,
Adrien Nader

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to