MCPcopy Create free account
hub / github.com/catboost/catboost / DoSub

Function DoSub

library/cpp/coroutine/engine/coroutine_ut.cpp:475–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473 }
474
475 static void DoSub(TCont* cont, void* argPtr) noexcept {
476 TState& state = *(TState*)(argPtr);
477 state.Sub = cont;
478
479 // 04.{Ready:[Aux]} > {Ready:[Aux,Sub2]}
480 auto* sub2 = cont->Executor()->Create(DoSub2, argPtr, "Sub2");
481
482 // 05.{Ready:[Aux,Sub2]} > SwitchTo(Aux)
483 // 09.{Ready:[],Deleted:[Sub2]} > Cancel(Sub2) > {Ready:[Sub2],Deleted:[Sub2]}
484 // 10.{Ready:[Sub2],Deleted:[Sub2]} > SwitchTo(Sub2) > FAIL: can not return from exit
485 cont->Join(sub2);
486
487 state.Sub = nullptr;
488 }
489
490 static void DoMain(TCont* cont) noexcept {
491 TState state;

Callers

nothing calls this directly

Calls 8

ExecuteEventFunction · 0.85
YieldMethod · 0.80
MaxFunction · 0.50
NowFunction · 0.50
CreateMethod · 0.45
ExecutorMethod · 0.45
JoinMethod · 0.45
WakeMethod · 0.45

Tested by

no test coverage detected