Skip to main content

SchedClassRq

Trait SchedClassRq 

Source
pub trait SchedClassRq {
    // Required methods
    fn enqueue(&mut self, task: Arc<Task>);
    fn len(&self) -> usize;
    fn pick_next(&mut self) -> Option<Arc<Task>>;
    fn update_current(
        &mut self,
        rt: &CurrentRuntime,
        task: &Task,
        is_yield: bool,
    ) -> bool;
    fn remove(&mut self, task_id: TaskId) -> bool;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn enqueue(&mut self, task: Arc<Task>)

Performs the enqueue operation.

Source

fn len(&self) -> usize

Performs the len operation.

Source

fn pick_next(&mut self) -> Option<Arc<Task>>

Performs the pick next operation.

Source

fn update_current( &mut self, rt: &CurrentRuntime, task: &Task, is_yield: bool, ) -> bool

Updates current.

Source

fn remove(&mut self, task_id: TaskId) -> bool

Performs the remove operation.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns whether empty.

Implementors§