Struct scheduler::CFScheduler
source · pub struct CFScheduler<T> { /* private fields */ }
Expand description
A simple Completely Fair Scheduler (CFS).
Implementations§
source§impl<T> CFScheduler<T>
impl<T> CFScheduler<T>
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new empty CFScheduler
.
sourcepub fn scheduler_name() -> &'static str
pub fn scheduler_name() -> &'static str
get the name of scheduler
Trait Implementations§
source§impl<T> BaseScheduler for CFScheduler<T>
impl<T> BaseScheduler for CFScheduler<T>
source§fn remove_task(&mut self, task: &Self::SchedItem) -> Option<Self::SchedItem>
fn remove_task(&mut self, task: &Self::SchedItem) -> Option<Self::SchedItem>
Removes a task by its reference from the scheduler. Returns the owned
removed task with ownership if it exists. Read more
source§fn pick_next_task(&mut self) -> Option<Self::SchedItem>
fn pick_next_task(&mut self) -> Option<Self::SchedItem>
Picks the next task to run, it will be removed from the scheduler.
Returns
None
if there is not runnable task.source§fn put_prev_task(&mut self, prev: Self::SchedItem, _preempt: bool)
fn put_prev_task(&mut self, prev: Self::SchedItem, _preempt: bool)
Puts the previous task back to the scheduler. The previous task is
usually placed at the end of the ready queue, making it less likely
to be re-scheduled. Read more
Auto Trait Implementations§
impl<T> RefUnwindSafe for CFScheduler<T>where
T: RefUnwindSafe,
impl<T> Send for CFScheduler<T>
impl<T> Sync for CFScheduler<T>
impl<T> Unpin for CFScheduler<T>
impl<T> UnwindSafe for CFScheduler<T>where
T: RefUnwindSafe,
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