pub struct SharedDynamicScheduler(/* private fields */);Expand description
Thread-safe, reference-counted wrapper around DynamicPriorityScheduler.
Cheaply cloneable – clones share the same underlying queue.
Implementations§
Sourcepub fn push(&self, task_id: TaskId, priority: Priority) -> PriorityHandle
pub fn push(&self, task_id: TaskId, priority: Priority) -> PriorityHandle
Push a task. Returns a PriorityHandle that allows later
reprioritization.
Sourcepub fn reprioritize(&self, task_id: TaskId, new_priority: Priority) -> bool
pub fn reprioritize(&self, task_id: TaskId, new_priority: Priority) -> bool
Reprioritize a task by id. Returns false if the task is no longer
queued.
Sourcepub fn peek_priority(&self, task_id: TaskId) -> Option<Priority>
pub fn peek_priority(&self, task_id: TaskId) -> Option<Priority>
Query the current priority of a queued task.
Trait Implementations§
Source§fn clone(&self) -> SharedDynamicScheduler
fn clone(&self) -> SharedDynamicScheduler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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