pub struct Claimant { /* private fields */ }Expand description
A holder’s handle on one slot of a Budget: what a divisible entry
hands the worker. Copy, so a worker may keep one per loop it runs.
Implementations§
Source§impl Claimant
impl Claimant
Sourcepub fn release(&self)
pub fn release(&self)
Give the share back early. The supervisor does this when the holder stops; a holder that is done with the budget mid-run does it itself.
Sourcepub async fn wait_grant_change(&self, seen: u32) -> u32
pub async fn wait_grant_change(&self, seen: u32) -> u32
Wait until the grant differs from seen, then return it.
Uses a check/register/recheck to avoid missing a rebalance between the
load and the park. Only one waiter may park per slot; use your own
Claimant.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Claimant
impl !UnwindSafe for Claimant
impl Freeze for Claimant
impl Send for Claimant
impl Sync for Claimant
impl Unpin for Claimant
impl UnsafeUnpin for Claimant
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