tiny.mprompt.resumeTailPrompt
Defined in tiny.mprompt.
Resumes like resumePrompt, but the resumed code's next suspend or return jumps to the point that called the yield function, so this call does not return to its caller.
Source
Source: lib/mprompt/src/prompt.zig:600
zig
/// Resumes like `resumePrompt`, but the resumed code's next suspend or return jumps to the point/// that called the yield function, so this call does not return to its caller. A yield function/// that ends by resuming calls it to discard its own frame under the resumed code, as a generator/// does for each value. The call must be made from inside the yield function that received this/// resumption, as that function's last action. For a multi-shot handle, the first tail resume after/// `resumeMulti` works this way, and later ones act as `resumePrompt` does.pub fn resumeTailPrompt(resume_ptr: *Resume, arg: ?*anyopaque) ?*anyopaque { if (resumeIsOnce(resume_ptr)) |p| { @branchHint(.likely); return promptResumeTail(p, arg, p.return_point.?); } else { @branchHint(.unlikely); return mresumeTail(resumeIsMulti(resume_ptr).?, arg); }}Source: lib/mprompt/src/root.zig:87
zig
pub const resumeTailPrompt = raw.resumeTailPrompt;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |