https://bugs.winehq.org/show_bug.cgi?id=53014
--- Comment #8 from jswinebz@kanargh.org.uk --- As for the lock: it is entirely proper and reasonable, I guess, for class.c to hold the user_lock when doing such modifications. If it wants to. It is after all only interacting with other parts of user32.
What it not right is for DllMain to take that same lock within destroy_thread_windows: taking additional locks within DllMain is *bad* and *wrong* and has been well-known to be such for about 30 fucking years. Here is the reference for *that*:
https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-bes...