Expand description
The async↔scheduler bridge.
The tree-walker executes statements in an async fn. To run concurrent tasks
on the (synchronous, poll-based) [logicaffeine_runtime] scheduler, each
concurrency op writes a BlockingRequest into a per-task side-channel
(YieldState) and .awaits a YieldFuture, which returns Poll::Pending
once — suspending the interpreter’s async stack at exactly that point. The
task’s driver (super::driver::InterpreterTask) reads the request, maps it
to a scheduler TaskStep, and on the next poll delivers the scheduler’s
resume value back through the same channel.
Structs§
- Yield
Future - The future a concurrency op
.awaits: it returnsPoll::Pendingexactly once (the request was written just before), suspending the interpreter’s async stack; the next poll (driven by the scheduler) resolves to the resume value. - Yield
State - The per-task side-channel: the interpreter writes a
request, the driver delivers aresume.
Enums§
- Blocking
Request - A blocking (or non-blocking-but-scheduler-routed) request the interpreter hands to the scheduler.
- Resume
Value - What the scheduler delivers back to the interpreter on resume.
Type Aliases§
- Yield
- A shared handle to a task’s side-channel (cloned between the interpreter and
its driving
InterpreterTask).