Struct ksched::executor::LocalExecutor [−][src]
pub struct LocalExecutor { /* fields omitted */ }
Expand description
Per-cpu executor.
Implementations
impl LocalExecutor
[src]
impl LocalExecutor
[src]pub fn spawn(
&self,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]
pub fn spawn(
&self,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]Spawn a new task to be run.
Examples
ksched::task::spawn(async { println!("hello, world"); }).expect("oom");
pub fn spawn_time_sharing(
&self,
quantum: usize,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]
pub fn spawn_time_sharing(
&self,
quantum: usize,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]Spawn a time-sharing task to run.
pub fn spawn_real_time(
&self,
priority: usize,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]
pub fn spawn_real_time(
&self,
priority: usize,
future: impl Future<Output = ()> + 'static + Send
) -> Result<(), AllocError>
[src]Spawn a real-time task to run.
For efficiency, a real-time task can only be scheduled by the executor that spawns it.