| 175 | } |
| 176 | |
| 177 | void hx::thread::ThreadImpl_obj::finalise(hx::Object* obj) |
| 178 | { |
| 179 | auto thread = reinterpret_cast<ThreadImpl_obj*>(obj); |
| 180 | auto native = std::unique_ptr<ThreadImpl_obj::Native>{ thread->native }; |
| 181 | |
| 182 | if (native->thread.joinable()) |
| 183 | { |
| 184 | native->thread.detach(); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | #endif |