| 89 | } |
| 90 | |
| 91 | unsigned long Win32Thread::ThreadProc(void* pThis) |
| 92 | { |
| 93 | auto thread = (Win32Thread*)pThis; |
| 94 | #if PLATFORM_WINDOWS |
| 95 | __try |
| 96 | #endif |
| 97 | { |
| 98 | const int32 exitCode = thread->Run(); |
| 99 | return static_cast<unsigned long>(exitCode); |
| 100 | } |
| 101 | #if PLATFORM_WINDOWS |
| 102 | __except (Platform::SehExceptionHandler(GetExceptionInformation())) |
| 103 | { |
| 104 | return -1; |
| 105 | } |
| 106 | #endif |
| 107 | } |
| 108 | |
| 109 | void Win32Thread::Join() |
| 110 | { |