We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9566a13 + be275d4 commit 2f76085Copy full SHA for 2f76085
src/queue.c
@@ -6264,8 +6264,13 @@ _dispatch_worker_thread(void *context)
6264
static unsigned WINAPI
6265
_dispatch_worker_thread_thunk(LPVOID lpParameter)
6266
{
6267
- _dispatch_worker_thread(lpParameter);
6268
- return 0;
+ HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE);
+ if (FAILED(hr)) {
6269
+ _dispatch_client_assert_fail("Error %ld initializing Windows Runtime", hr);
6270
+ }
6271
+ _dispatch_worker_thread(lpParameter);
6272
+ CoUninitialize();
6273
+ return 0;
6274
}
6275
#endif // defined(_WIN32)
6276
#endif // DISPATCH_USE_PTHREAD_POOL
0 commit comments