On 2022-10-21 11:44, Eric Botcazou via Libstdc++ wrote:
/How does this compare with Eric B's proposal at />>>/https://gcc.gnu.org/legacy-ml/gcc-patches/2019-06/msg01840.html
? />>//>>/My proposal was to reimplement (and extend) the native thread model />>/(win32) />>/instead
of adding a new one, the advantage being that you don't need an />>/extra />/> threading layer between GCC and
Windows. />
I agree!
I agree as well and I expressed that on mingw-w64 ML when the patch was
introduced [1]. My main concern with the new threading model is that instead of
solving root of the problem, it introduces more fragmentation with no clear
benefit.
On top of that, mcfgthread library is way more invasive than it needs to be. It
requires maintaining per-thread struct and reimplements a number of things
instead of leveraging OS capabilities. Author also plans to make invasive
changes to mingw-w64-crt, which go against it current approach of being
agnostic to threading model.
Jacek
[1] https://sourceforge.net/p/mingw-w64/mailman/message/37719727/