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)
144144 ShLwApi
145145 WS2_32
146146 WinMM
147- synchronization)
147+ synchronization
148+ WindowsApp)
148149endif ()
149150
150151if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
Original file line number Diff line number Diff line change 2222#if HAVE_MACH
2323#include "protocol.h" // _dispatch_send_wakeup_runloop_thread
2424#endif
25+ #if defined(_WIN32 )
26+ #include <roapi.h> // RoInitialize
27+ #endif
2528
2629static inline void _dispatch_root_queues_init (void );
2730static void _dispatch_lane_barrier_complete (dispatch_lane_class_t dqu ,
@@ -6264,8 +6267,15 @@ _dispatch_worker_thread(void *context)
62646267static unsigned WINAPI
62656268_dispatch_worker_thread_thunk (LPVOID lpParameter )
62666269{
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 ;
62696279}
62706280#endif // defined(_WIN32)
62716281#endif // DISPATCH_USE_PTHREAD_POOL
You can’t perform that action at this time.
0 commit comments