Skip to main content

WAITER_SLICE

Constant WAITER_SLICE 

Source
pub const WAITER_SLICE: Duration;
Expand description

Per-slice native blocking-with-timeout budget. Sized to:

  • Stay below the 60 fps frame budget (16.6 ms) so a future dropped at the frame boundary releases its waiter slot inside the same frame.
  • Be coarse enough that the syscall overhead per slice is amortised even on long waits — at 5 s of accumulated wait, the thread re-enters the kernel ~500 times, not 5_000.
  • Bound cancellation + deadline-exceeded latency to a single slice.

Tunable as a Duration rather than a feature so the value can be re-derived in tests without rebuilding the crate.