Skip to content

Commit

Permalink
Merge pull request diasurgical#2018 from mewpull/dtherad-wait-inf
Browse files Browse the repository at this point in the history
dthread: use INFINITE enum for second argument to WaitForSingleObject
  • Loading branch information
mewmew authored Mar 8, 2020
2 parents dce3895 + f6e6b4b commit 54a2382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/dthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ unsigned int __stdcall dthread_handler(void *data)
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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 54a2382

Please sign in to comment.