在 2022/10/13 01:15, Jacek Caban 写道:
I'd argue that this requirement will need to be relaxed at some point and fixing threading support would be a good reason to do that. If someone really wants win9x, winpthreads could still be used (or simply one could use an older version of GCC).
This is valid on its own. However extending or modifying the win32 thread model is risky on almost all aspects:
* Backward compatibility, because it's default on some platforms e.g. Debian; * Availability, because it will drop support for XP; * Stability, because some people may disagree with me on use of some undocumented APIs.The third one is essential. Even if we may make use of `SRWLOCK` and `CONDITION_VARIABLE` since Vista, there are obvious drawbacks: `SRWLOCK` does not have timed wait functions; `CONDITION_VARIABLE` works with nothing but `SRWLOCK` or `CRITICAL_SECTION`; there is completely no support for absolute timeouts; timeout values are 32-bit integers in milliseconds, which is not only inaccurate, but can also easily get overflown.
My opinion is that a 'clean', better designed solution should be preferred to such boilerplate code.
It should be possible to implement that without a custom thread-control structure, Windows API combined with msvcrt (urct) provides means for achieving that.
Well, if it's in principle possible but too complicated, I'd rather not do that, as explained earlier in this message.
Therefore it has become a personal preference, to not maintain something as a part of GCC, mostly due to their lack of enthusiasm about Windows.Well, sure, but that's not a technical argument.
It isn't. I wouldn't argue on that. :) -- Best regards, LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
