MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / new_debugger_thread

Function new_debugger_thread

src/builtin/module_builtin_jobque.cpp:676–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674 }
675
676 void new_debugger_thread ( const Block & lambda, Context * context, LineInfoArg * lineinfo ) {
677 g_jobQueTotalThreads ++;
678 debugger_started.store(true);
679 shared_ptr<Context> forkContext;
680 forkContext.reset(get_clone_context(context, uint32_t(ContextCategory::thread_clone)));
681 forkContext->sharedPtrContext = true;
682 auto bound = daScriptEnvironment::getBound();
683 thread([=]() mutable {
684 daScriptEnvironment::setBound(bound);
685 das_invoke<void>::invoke(forkContext.get(), lineinfo, lambda);
686 forkContext.reset();
687 stop_debugger();
688 stop_requested = false;
689 shutdownThreadLocalDebugAgent();
690 }).detach();
691 }
692
693 void withJobQue ( const TBlock<void> & block, Context * context, LineInfoArg * lineInfo ) {
694 if ( !g_jobQue ) {

Callers

nothing calls this directly

Calls 6

get_clone_contextFunction · 0.85
stop_debuggerFunction · 0.85
invokeFunction · 0.50
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected