|
|
|
|
@ -93,7 +93,7 @@ unsigned int __stdcall dthread_handler(void *)
|
|
|
|
|
DWORD dwMilliseconds; |
|
|
|
|
|
|
|
|
|
while (dthread_running) { |
|
|
|
|
if (!sgpInfoHead && WaitForSingleObject(sghWorkToDoEvent, 0xFFFFFFFF) == -1) { |
|
|
|
|
if (!sgpInfoHead && WaitForSingleObject(sghWorkToDoEvent, INFINITE) == -1) { |
|
|
|
|
error_buf = TraceLastError(); |
|
|
|
|
app_fatal("dthread4:\n%s", error_buf); |
|
|
|
|
} |
|
|
|
|
@ -140,7 +140,7 @@ void dthread_cleanup()
|
|
|
|
|
dthread_running = FALSE; |
|
|
|
|
SetEvent(sghWorkToDoEvent); |
|
|
|
|
if (sghThread != INVALID_HANDLE_VALUE && glpDThreadId != GetCurrentThreadId()) { |
|
|
|
|
if (WaitForSingleObject(sghThread, 0xFFFFFFFF) == -1) { |
|
|
|
|
if (WaitForSingleObject(sghThread, INFINITE) == -1) { |
|
|
|
|
error_buf = TraceLastError(); |
|
|
|
|
app_fatal("dthread3:\n(%s)", error_buf); |
|
|
|
|
} |
|
|
|
|
|