Skip to main content

Module bridge

Module bridge 

Source
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§

YieldFuture
The future a concurrency op .awaits: it returns Poll::Pending exactly 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.
YieldState
The per-task side-channel: the interpreter writes a request, the driver delivers a resume.

Enums§

BlockingRequest
A blocking (or non-blocking-but-scheduler-routed) request the interpreter hands to the scheduler.
ResumeValue
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).