Skip to main content

Module sched

Module sched 

Source
Expand description

The scheduler kernel: pure state machine, no I/O, no clock, no allocation in the steady state.

The caller drives it: feed observations (on_bytes, on_complete), call tick(now), and act on the returned Actions. This is what lets the same code run under the discrete-event simulator and under real HTTP.

Implements dynamic range partitioning, divergence-triggered steal-to-equalize, work-conserving assignment, queue dispatch, stall reclamation, and greedy concurrency.

Structs§

Scheduler
Source
Stats

Enums§

Action
Capability

Constants§

STEAL_QUANTUM
Minimum steal quantum. A range rebalance smaller than this is not worth request overhead.

Functions§

greedy_concurrency
Greedy concurrency allocation across multiple sources.