File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -4611,6 +4611,10 @@ _dispatch_runloop_queue_class_poke(dispatch_queue_t dq)
4611
4611
result = eventfd_write (handle , 1 );
4612
4612
} while (result == -1 && errno == EINTR );
4613
4613
(void )dispatch_assume_zero (result );
4614
+ #elif defined(_WIN32 )
4615
+ BOOL bSuccess ;
4616
+ bSuccess = SetEvent (handle );
4617
+ (void )dispatch_assume (bSuccess );
4614
4618
#else
4615
4619
#error "runloop support not implemented on this platform"
4616
4620
#endif
@@ -6312,7 +6316,12 @@ _dispatch_runloop_queue_handle_init(void *ctxt)
6312
6316
}
6313
6317
handle = fd ;
6314
6318
#elif defined(_WIN32 )
6315
- handle = INVALID_HANDLE_VALUE ;
6319
+ HANDLE hEvent = CreateEventW (NULL , /*bManualReset=*/ TRUE,
6320
+ /*bInitialState=*/ FALSE, NULL );
6321
+ if (hEvent == NULL ) {
6322
+ DISPATCH_INTERNAL_CRASH (GetLastError (), "CreateEventW" );
6323
+ }
6324
+ handle = hEvent ;
6316
6325
#else
6317
6326
#error "runloop support not implemented on this platform"
6318
6327
#endif
You can’t perform that action at this time.
0 commit comments