Skip to main content

Module scheduler

Module scheduler 

Source
Expand description

The scheduler core + cooperative driver.

A single, deterministic, seed-driven scheduler that multiplexes Tasks over channels, Select, and timers. The cooperative driver (Scheduler::run) runs everything on one thread, resolving every nondeterministic decision through the embedded Chooser (so a fixed seed ⇒ a fixed run, and a trace ⇒ an exact replay). The ready-selection discipline is the configured SchedulePolicy; determinism holds under all of them.

Structs§

ChanView
A read-only view of one channel for Scheduler::snapshot.
SchedSnapshot
A deterministic, read-only snapshot of the scheduler between steps — the observability seam the browser drive loop emits to the Studio so a running concurrent program shows its live task and channel state instead of freezing the UI.
Scheduler
The deterministic task scheduler.
TaskView
A read-only view of one task for Scheduler::snapshot.

Enums§

RunOutcome
The result of running a scheduler to quiescence.
TaskStateKind
A public, read-only projection of a task’s scheduling state — what the Studio’s Tasks/Channels strip renders. Mirrors the private [TaskState] without exposing the task body or any mutable handle.

Functions§

run_with_seed
Run setup (which spawns tasks and creates channels) under a fresh recording scheduler seeded by seed, returning the outcome and the scheduling trace.
run_with_trace
Re-run setup under a replaying scheduler driven by trace, returning the outcome.