On Mon Nov 21 07:04:16 2022 +0000, Fabian Maurer wrote:
@rbernon Ah, I overlooked that... Would a function similar to FreeLibraryAndExitThread be acceptable? Like __wine_set_signal_and_exit_thread? Then we set a signal and keep waiting for the loader_lock inside Wine code, so no race conditions there.
I don't think it needs a wine specific function and I don't think it's the right way to fix it. The right fix would probably be to keep the thread alive only when there's dinput instances alive but that's much more changes.