Davide Beatrici (@davidebeatrici) commented about dlls/mmdevapi/client.c:
- }
- if (!g_main_loop_thread) {
HANDLE event = CreateEventW(NULL, TRUE, FALSE, NULL);if (!(g_main_loop_thread = CreateThread(NULL, 0, main_loop_func, event, 0, NULL))){ERR("Failed to create mainloop thread.\n");sessions_unlock();CloseHandle(event);return E_FAIL;}SetThreadPriority(g_main_loop_thread, THREAD_PRIORITY_TIME_CRITICAL);WaitForSingleObject(event, INFINITE);CloseHandle(event);- }
In future we could move this into the unixlib, perhaps as part of `create_stream`.