MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / operator()

Method operator()

modules/core/task/src/task2.cpp:107–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 void operator()()
108 {
109 SKR_ASSERT(*this);
110 if (func)
111 {
112 func();
113 func = {};
114 }
115 else
116 {
117#ifdef SKR_PROFILE_ENABLE
118 // the first fiber enter is in coroutine body
119 if(coro.promise().name != nullptr)
120 SkrFiberEnter(coro.promise().name);
121#endif
122 SKR_ASSERT(!coro.done());
123 coro.resume();
124 }
125 }
126
127 explicit operator bool() const
128 {

Callers 1

scheduleFunction · 0.45

Calls 2

doneMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected