pub struct Priority(/* private fields */);Expand description
Implementations§
Source§impl Priority
impl Priority
Sourcepub fn normal() -> Self
pub fn normal() -> Self
The priority level given to normal processes; The default priority level.
assert_eq!(Process::current().priority().unwrap(), Priority::normal(),
"I'm normal! Normal I tell you!");Sourcepub fn higher(&self) -> impl Iterator<Item = Self>
pub fn higher(&self) -> impl Iterator<Item = Self>
Raise the priority level.
Be particularly careful with giving processes higher priority levels:
Any process with a lower level will be halted until it pauses.
Therefore, make sure any work it does is breif, and it uses OS APIs for
delays (std::thread::sleep instead of loop {})
Trait Implementations§
Source§impl Ord for Priority
impl Ord for Priority
Source§impl PartialOrd for Priority
impl PartialOrd for Priority
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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