Function context_switch

Source
pub async fn context_switch(
    ctx: AsyncFunctionEnvMut<WasiEnv>,
    target_context_id: u64,
) -> Result<Errno, RuntimeError>
Expand description

Suspend the active context and resume another

The resumed context continues from where it was last suspended, or from its entrypoint if it has never been resumed.

Refer to the wasix-libc wasix/context.h header for authoritative documentation.