Skip to content

Commit a181700

Browse files
committed
dispatch: use auto-reset event for dispatch queue
Use an auto-reset event for the dispatch queue on Windows. On Linux, `eventfd` is used, which is auto-reset unless `EFD_SEMAPHORE` is specified. This mirrors that behaviour. The test suite continues to pass after this change.
1 parent ae5c03e commit a181700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6560,7 +6560,7 @@ _dispatch_runloop_queue_handle_init(void *ctxt)
65606560
handle = fd;
65616561
#elif defined(_WIN32)
65626562
HANDLE hEvent;
6563-
hEvent = CreateEventW(NULL, /*bManualReset=*/TRUE,
6563+
hEvent = CreateEventW(NULL, /*bManualReset=*/FALSE,
65646564
/*bInitialState=*/FALSE, NULL);
65656565
if (hEvent == NULL) {
65666566
DISPATCH_INTERNAL_CRASH(GetLastError(), "CreateEventW");

0 commit comments

Comments
 (0)