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

Method onThreadDetach

src/hx/Debug.cpp:282–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void StackContext::onThreadDetach()
283{
284 #ifdef HXCPP_CATCH_SEGV
285 #ifdef _MSC_VER
286 _set_se_translator( mOldSignalFunc );
287 #else
288 signal( SIGSEGV, mOldSignalFunc );
289 #endif
290 #endif
291
292 #ifdef HXCPP_DEBUGGER
293 if (mDebugger)
294 dbgCtxDetach(mDebugger);
295 #endif
296
297 #ifdef HXCPP_TELEMETRY
298 if (mTelemetry)
299 tlmDetach(mTelemetry);
300 #endif
301
302 #ifdef HXCPP_PROFILER
303 if (mProfiler)
304 profDetach(mProfiler,this);
305 #endif
306
307 #ifdef HXCPP_STACK_IDS
308 {
309 std::lock_guard<std::mutex> guard(sStackMapMutex);
310 sStackMap.erase(mThreadId);
311 }
312 mThreadId = 0;
313 #endif
314
315 #ifdef HXCPP_COMBINE_STRINGS
316 stringSet = 0;
317 #endif
318}
319
320#ifdef HXCPP_STACK_IDS
321void StackContext::getAllStackIds( QuickVec<int> &outIds )

Callers

nothing calls this directly

Calls 5

signalFunction · 0.85
dbgCtxDetachFunction · 0.85
tlmDetachFunction · 0.85
profDetachFunction · 0.85
eraseMethod · 0.80

Tested by

no test coverage detected