Skip to documentation
SLOP

tiny.mprompt.suspendPrompt

Reference tiny.mprompt suspendPrompt

Defined in zig_api.

Suspends the body at prompt, so the pending start or continueWith call returns .suspended with a handle, for a body started by SuspendedRun that pauses and hands control back to the code that started or last continued it.

Called byCallsprivate sourcelib.mprompt.src.apistackUsingAsyncWorkerprivate sourcelib.mprompt.src.apisuspendOnceprivate sourcelib.mprompt.src.apisuspendTwiceprivate sourcelib.mprompt.src.apireadSlotzig_apisuspendPrompt
Static calls · unresolved targets: 0 · external targets: 1.

Source

Source: lib/mprompt/src/api.zig:247

zig
/// Suspends the body at `prompt`, so the pending `start` or `continueWith` call returns/// `.suspended` with a handle, for a body started by `SuspendedRun` that pauses and hands control/// back to the code that started or last continued it. The call returns the value the caller later/// passes to `continueWith`. `prompt` must be the prompt the body received from `start`, and the/// body must still be running on it, which assertions check in safe builds. Only a body started by/// `SuspendedRun` can call it, because under `run` the handle would be read as the body's result.pub fn suspendPrompt(comptime ResumeValue: type, prompt: *Prompt) ResumeValue {    return readSlot(ResumeValue, raw.yieldPrompt(prompt, suspend_prompt_callback, null));}

Source: lib/mprompt/src/root.zig:66

zig
pub const suspendPrompt = zig_api.suspendPrompt;

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433