25thread_local std::unordered_map<std::string, Frame>
26 BlockManager::routine_frame_map_{};
28BlockManager::BlockManager() {}
31 Frame* frame_ptr = GetRoutineFrame();
32 if (frame_ptr ==
nullptr || block ==
nullptr)
34 frame_ptr->
Push(block);
40 Frame* frame_ptr = GetRoutineFrame();
41 if (frame_ptr ==
nullptr || frame_ptr->
finished())
49 const std::string& routine_name = GetRoutineName();
55std::string BlockManager::GetRoutineName() {
56 std::string routine_name(
"default_croutine");
63Frame* BlockManager::GetRoutineFrame() {
64 const std::string& routine_name = GetRoutineName();
65 return &routine_frame_map_[routine_name];
static CRoutine * GetCurrentRoutine()
const std::string & name() const
void StartBlock(Block *block)
void set_depth(std::uint32_t depth)
std::uint32_t size() const
bool DumpToFile(const std::string &coroutine_name)