void CTargetPlatformCoroutine::resume(CCoroutine *other)
{
    if (other == this) return;
    assert(other->state_->fiber_);
    SwitchToFiber(other->state_->fiber_);
}

Example 2: Switching to a new coroutine.

Back to Article