在 2026-8-28 10:43, Kirill Makurin 写道:
That is fair point.Still, I think if there'll be no better solution to avoid potential deadlock in this `_beginthreadex` emulation, we can simply document that under no circumstances `_beginthreadex` shall be called from `DllMain` when using crtdll.dll/msvcrt10.dll. I think that most users are more likely to call `CreateThread` rather than `_beginthreadex` from `DllMain`, which can avoid deadlock if used carefully. This is just me thinking aloud.
I'm wondering why anyone would link their multi-thread code against crtdll nowadays.I'm also wondering why anyone would call prefer `_beginthreadex()` to `CreateThread()`. Unlike Microsoft CRT, mingw-w64 CRT is linked against MSVCRT or UCRT DLL, where these functions are almost identical, with similar parameters and semantics.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
