File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
144
144
ShLwApi
145
145
WS2_32
146
146
WinMM
147
- synchronization)
147
+ synchronization
148
+ WindowsApp)
148
149
endif ()
149
150
150
151
if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
Original file line number Diff line number Diff line change 22
22
#if HAVE_MACH
23
23
#include "protocol.h" // _dispatch_send_wakeup_runloop_thread
24
24
#endif
25
+ #if defined(_WIN32 )
26
+ #include <roapi.h> // RoInitialize
27
+ #endif
25
28
26
29
static inline void _dispatch_root_queues_init (void );
27
30
static void _dispatch_lane_barrier_complete (dispatch_lane_class_t dqu ,
@@ -6264,8 +6267,15 @@ _dispatch_worker_thread(void *context)
6264
6267
static unsigned WINAPI
6265
6268
_dispatch_worker_thread_thunk (LPVOID lpParameter )
6266
6269
{
6267
- _dispatch_worker_thread (lpParameter );
6268
- return 0 ;
6270
+ HRESULT hr = RoInitialize (RO_INIT_MULTITHREADED );
6271
+
6272
+ _dispatch_worker_thread (lpParameter );
6273
+
6274
+ if (SUCCEEDED (hr )) {
6275
+ RoUninitialize ();
6276
+ }
6277
+
6278
+ return 0 ;
6269
6279
}
6270
6280
#endif // defined(_WIN32)
6271
6281
#endif // DISPATCH_USE_PTHREAD_POOL
You can’t perform that action at this time.
0 commit comments