pub enum CoarseQuery {
BucketBound,
ExactMinimum,
}Expand description
How the wheel answers “what is due next” for a level it cannot read without breaking it down.
A coarse slot holds deadlines spanning its whole resolution, and finding the earliest means examining them. Whether that is worth doing depends entirely on the caller’s access pattern.
Variants§
BucketBound
Answer from the slot’s position alone: an entry in the slot at offset
k from the cursor cannot be due before that bucket begins.
Constant cost and never reads an entry, at the price of naming a time earlier than the truth, which costs the caller one wasted poll. Arming and cancelling stay flat because neither disturbs the answer.
ExactMinimum
Track the earliest deadline in each slot and answer with it.
Exact, so no wasted poll. The cost lands on cancellation: withdrawing the entry that supplied a slot’s minimum invalidates it, and the next query rebuilds that slot. A workload that arms a timeout per operation and cancels it on completion pays this on every operation.