Expand description
The scheduler: core types, configuration, and the main run loop.
Scheduler coordinates task execution — popping from the
TaskStore, applying backpressure,
IO-budget checks, and group concurrency limits,
preempting lower-priority work, and emitting SchedulerEvents for UI
integration. Use SchedulerBuilder for ergonomic construction.
The Scheduler implementation is split across focused submodules:
submit— task submission, lookup, cancellation, and supersedingrun_loop— the main event loop, dispatch, and shutdowncontrol— pause/resume, concurrency limits, and group limitsqueries— read-only queries (active tasks, progress, snapshots)builder— ergonomic construction viaSchedulerBuilderdispatch— task spawning, active-task tracking, and preemptiongate— admission control (IO budget, backpressure, group limits)event— event types and scheduler configurationprogress— progress reporting, byte-level tracking, and extrapolation
See the crate-level docs for a full walkthrough of the task lifecycle, common patterns, and how the dispatch loop works.
Re-exports§
pub use progress::EstimatedProgress;pub use progress::ProgressReporter;pub use progress::TaskProgress;
Modules§
- progress
- Progress reporting, byte-level transfer tracking, and throughput-based extrapolation.
Structs§
- Group
Limits - Per-group concurrency limits for task dispatch.
- Scheduler
- IO-aware priority scheduler.
- Scheduler
Builder - Ergonomic builder for constructing a
Schedulerwith all its dependencies. - Scheduler
Config - Scheduler configuration.
- Scheduler
Snapshot - Single-call status snapshot for dashboard UIs.
- Task
Event Header - Common fields shared by task-specific
SchedulerEventvariants.
Enums§
- Scheduler
Event - Events emitted by the scheduler for UI integration and observability.
- Shutdown
Mode - How the scheduler behaves during shutdown.