|
|
@@ -649,15 +649,18 @@ struct WineBridge { |
|
|
|
inst.creator_arg = arg; |
|
|
|
inst.creator_handle = ::CreateEventW(nullptr, false, false, nullptr); |
|
|
|
|
|
|
|
#if 0 |
|
|
|
::CreateThread(nullptr, 0, thread_creator_helper, arg, 0, nullptr); |
|
|
|
#else |
|
|
|
HANDLE handle = ::CreateThread(nullptr, 0, thread_creator_helper, arg, CREATE_SUSPENDED, nullptr); |
|
|
|
|
|
|
|
if (handle == INVALID_HANDLE_VALUE) |
|
|
|
return 1; |
|
|
|
|
|
|
|
// TODO read attrs and decide this |
|
|
|
SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); |
|
|
|
|
|
|
|
ResumeThread(handle); |
|
|
|
::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); |
|
|
|
::ResumeThread(handle); |
|
|
|
#endif |
|
|
|
|
|
|
|
::WaitForSingleObject(inst.creator_handle, INFINITE); |
|
|
|
*thread_id = inst.creator_pthread; |
|
|
|