| 138 | } |
| 139 | |
| 140 | hx::thread::ThreadImpl_obj::Native::Native(Thread_obj::CreateFunction _job, ThreadImpl _thread, CountingSemaphore _semaphore) |
| 141 | : thread(run, _thread, _job, _semaphore) |
| 142 | , handle(thread.native_handle()) |
| 143 | { |
| 144 | // Only Windows implements thread name getting and setting currently, and this requires the thread to be attached. |
| 145 | // Threads are normally only detached once the thread object is finalised and this was causing the 32bit linux tests to hit OS resource limits. |
| 146 | // This does feel like a bit of a bodge and something which will actually need to be addressed to add name setting on Linux. |
| 147 | |
| 148 | #ifndef HX_WINDOWS |
| 149 | thread.detach(); |
| 150 | #endif |
| 151 | } |
| 152 | |
| 153 | Dynamic hx::thread::ThreadImpl_obj::getSlot(const int id) |
| 154 | { |