MCPcopy Create free account
hub / github.com/covscript/covscript / yield

Function yield

sources/system/win32/common.cpp:309–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307 }
308
309 void yield()
310 {
311 if (current_process->fiber_stack.empty())
312 throw lang_error("Cannot yield outside a fiber.");
313 win32_fiber *fi = static_cast<win32_fiber *>(current_process->fiber_stack.top().get());
314 fi->state = fiber_state::suspended;
315 SwitchToFiber(fi->prev_ctx);
316 }
317 } // namespace fiber
318
319 namespace dll {

Callers

nothing calls this directly

Calls 3

lang_errorClass · 0.85
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected