mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-29 15:42:28 +00:00
d5fd0990a1
If those functions (e.g. called by common->Printf(), common->Error()) weren't called from the mainthread and win_outputEditString was set to 1, a deadlock could occur. Specifically, the async thread (handling sound) was calling common->Warning() -> Sys_Printf() -> Conbuf_AppendText() which called SendMessageA() which blocks until the main thread handles the message. The main thread however was in idSampleDecoderLocal::Decode() trying to enter CRITICAL_SECTION_ONE, which was held by the async thread (it's used to synchronize sound handling between main and async thread). So now if Sys_Printf() (or Sys_Error() which should have the same problem) is not called by the main thread, the text is buffered and Conbuf_AppendText() is called for the buffered lines in the next frame in Win_Frame(). |
||
---|---|---|
.. | ||
aros | ||
cmake | ||
linux | ||
osx | ||
posix | ||
stub | ||
win32 | ||
cpu.cpp | ||
doom_icon.h | ||
events.cpp | ||
glimp.cpp | ||
platform.h | ||
sys_local.cpp | ||
sys_local.h | ||
sys_public.h | ||
threads.cpp |