Do not run any cleanup if the program is exiting anyway#2372
Do not run any cleanup if the program is exiting anyway#2372martin-frbg merged 1 commit intoOpenMathLib:developfrom martin-frbg:winexit
Conversation
From keno's PR #2350 - this avoids the potential hang in blas_thread_shutdown where we may wait for threads to exit while they are waiting on the loader lock from DllMain
|
We continued seeing hangs even after this patch and after some additional investigation, this patch turns out to be insufficient. We have another copy of DllMain here: https://github.com/xianyi/OpenBLAS/blob/develop/driver/others/memory.c#L1551 (as well as one more in that file), as well as a bunch of CRT tricks. In addition gotoblas_quit is declared as |
|
Yes memory.c is messy, it is basically two versions of the same file rolled into one - owing to the bad experience with the TLS patches. And I suspect the DllMain there will only be invoked in static builds. |
From keno's PR #2350 - this avoids the potential hang in blas_thread_shutdown where we may wait for threads to exit while they are waiting on the loader lock from DllMain