Skip to content

Commit c59fb3e

Browse files
compnerdrokhinip
authored andcommitted
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. Signed-off-by: Rokhini Prabhu <rokhinip@apple.com>
1 parent e94c8ea commit c59fb3e

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
@@ -7057,7 +7057,7 @@ _dispatch_runloop_queue_handle_init(void *ctxt)
70577057
handle = fd;
70587058
#elif defined(_WIN32)
70597059
HANDLE hEvent;
7060-
hEvent = CreateEventW(NULL, /*bManualReset=*/TRUE,
7060+
hEvent = CreateEventW(NULL, /*bManualReset=*/FALSE,
70617061
/*bInitialState=*/FALSE, NULL);
70627062
if (hEvent == NULL) {
70637063
DISPATCH_INTERNAL_CRASH(GetLastError(), "CreateEventW");

0 commit comments

Comments
 (0)