I am seeing a deadlock with std::mutex when the mutex is locked from DllMain() Below is a minimal DLL test case that exhibits the problem for me. M
std::mutex
DllMain()
Check the Best Practices for Creating DLLs document:
You should never perform the following tasks from within DllMain: Call LoadLibrary or LoadLibraryEx (either directly or indirectly). This can cause a deadlock or a crash. Synchronize with other threads. This can cause a deadlock.
You should never perform the following tasks from within DllMain: