struct State {
heap: BinaryHeap<Reverse<Slot>>,
seq: u64,
stopping: bool,
wakes: u64,
last_sweep: Instant,
}Expand description
Everything the release thread and its registrars share under one lock.
Fields§
§heap: BinaryHeap<Reverse<Slot>>A min-heap of armed deadlines.
seq: u64Monotonic registration counter, the tie-break in Slot’s Ord.
stopping: boolSet by ReleaseTimer’s Drop; the thread returns on its next
wake.
wakes: u64Loop iterations. Always compiled — it is one u64 increment under
a lock the thread already holds — and read only by debug_wakes.
The += counts as a read, so dead_code does not fire on it in a
non-test build.
last_sweep: InstantWhen the heap was last rebuilt to drop abandoned slots.
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more