MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Native

Method Native

src/hx/thread/ThreadImpl.cpp:140–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140hx::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
153Dynamic hx::thread::ThreadImpl_obj::getSlot(const int id)
154{

Callers

nothing calls this directly

Calls 1

detachMethod · 0.45

Tested by

no test coverage detected