pub struct PriorityInheritance { /* private fields */ }Expand description
Priority-inheritance protocol core (RT-CORBA §5.6).
Holds the base priority of a lock owner plus the priorities of all waiters
currently blocked on this lock. effective is the
maximum — the priority at which the owner should run while it holds the lock.
Implementations§
Source§impl PriorityInheritance
impl PriorityInheritance
Sourcepub fn new(base: Priority) -> Self
pub fn new(base: Priority) -> Self
New state for an owner with the given base priority, without waiters.
Sourcepub fn on_block(&mut self, waiter: Priority) -> Priority
pub fn on_block(&mut self, waiter: Priority) -> Priority
A waiter now blocks on the lock. Returns the (possibly raised) effective priority.
Sourcepub fn on_unblock(&mut self, waiter: Priority) -> Priority
pub fn on_unblock(&mut self, waiter: Priority) -> Priority
A waiter was served/cancelled — its priority drops out of the inheritance. Returns the new effective priority.
Sourcepub fn waiter_count(&self) -> usize
pub fn waiter_count(&self) -> usize
Number of currently blocked waiters.
Trait Implementations§
Source§impl Clone for PriorityInheritance
impl Clone for PriorityInheritance
Source§fn clone(&self) -> PriorityInheritance
fn clone(&self) -> PriorityInheritance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PriorityInheritance
impl RefUnwindSafe for PriorityInheritance
impl Send for PriorityInheritance
impl Sync for PriorityInheritance
impl Unpin for PriorityInheritance
impl UnsafeUnpin for PriorityInheritance
impl UnwindSafe for PriorityInheritance
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