Skip to content

Commit

Permalink
Save CPU time during WaitForMultipleObjectsEx call
Browse files Browse the repository at this point in the history
  • Loading branch information
koukuno authored Nov 30, 2020
1 parent 57766d0 commit 1f826f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ int main(void)
CloseHandle(CreateThread(NULL, 0, wait_for_client, NULL, 0, NULL));
for (;;) {
HANDLE events[] = { wine_evt, conn_evt };
DWORD result = WaitForMultipleObjectsEx(2, events, FALSE, 0, FALSE);
DWORD result = WaitForMultipleObjectsEx(2, events, FALSE, INFINITE, FALSE);
if (result == WAIT_TIMEOUT)
continue;

if (result == 0) {
printf("Bridge exiting, wine closing\n");
printf("closing bridge since wine is exiting\n");
}

break;
Expand Down

0 comments on commit 1f826f9

Please sign in to comment.