| 71 | } |
| 72 | |
| 73 | bool Win32Thread::Start(uint32 stackSize) |
| 74 | { |
| 75 | // Spawn thread |
| 76 | DWORD id; |
| 77 | _thread = (void*)CreateThread(nullptr, stackSize, (LPTHREAD_START_ROUTINE)ThreadProc, this, STACK_SIZE_PARAM_IS_A_RESERVATION, &id); |
| 78 | if (_thread == nullptr) |
| 79 | return true; |
| 80 | |
| 81 | // Initialize priority |
| 82 | SetPriorityInternal(_priority); |
| 83 | |
| 84 | #if WINDOWS_ENABLE_THREAD_NAMING |
| 85 | SetThreadName(id, _name.ToStringAnsi().Get()); |
| 86 | #endif |
| 87 | |
| 88 | return false; |
| 89 | } |
| 90 | |
| 91 | unsigned long Win32Thread::ThreadProc(void* pThis) |
| 92 | { |
no test coverage detected