pub enum SchedulingDecision {
    RunProcess((ProcessId, Option<u32>)),
    TrySleep,
}
Expand description

Enum representing the actions the scheduler can request in each call to scheduler.next().

Variants

RunProcess((ProcessId, Option<u32>))

Tell the kernel to run the specified process with the passed timeslice. If None is passed as a timeslice, the process will be run cooperatively.

TrySleep

Tell the kernel to go to sleep. Notably, if the scheduler asks the kernel to sleep when kernel tasks are ready, the kernel will not sleep, and will instead restart the main loop and call next() again.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.