Struct fibers::fiber::SchedulerHandle
[−]
[src]
pub struct SchedulerHandle { /* fields omitted */ }
A handle of a scheduler.
Methods
impl SchedulerHandle
[src]
fn wakeup(&self, fiber_id: FiberId)
Wakes up a specified fiber in the scheduler.
This forces the fiber to be pushed to the run queue of the scheduler.
Trait Implementations
impl Debug for SchedulerHandle
[src]
impl Clone for SchedulerHandle
[src]
fn clone(&self) -> SchedulerHandle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Spawn for SchedulerHandle
[src]
fn spawn_boxed(&self, fiber: BoxFuture<(), ()>)
Spawns a fiber which will execute given boxed future.
fn spawn<F>(&self, fiber: F) where
F: Future<Item = (), Error = ()> + Send + 'static,
F: Future<Item = (), Error = ()> + Send + 'static,
Spawns a fiber which will execute given future.
fn spawn_fn<F, T>(&self, f: F) where
F: FnOnce() -> T + Send + 'static,
T: IntoFuture<Item = (), Error = ()> + Send + 'static,
T::Future: Send,
F: FnOnce() -> T + Send + 'static,
T: IntoFuture<Item = (), Error = ()> + Send + 'static,
T::Future: Send,
Equivalent to self.spawn(futures::lazy(|| f()))
.
fn spawn_monitor<F, T, E>(&self, f: F) -> Monitor<T, E> where
F: Future<Item = T, Error = E> + Send + 'static,
T: Send + 'static,
E: Send + 'static,
F: Future<Item = T, Error = E> + Send + 'static,
T: Send + 'static,
E: Send + 'static,
Spawns a fiber and returns a future to monitor it's execution result.
fn spawn_link<F, T, E>(&self, f: F) -> Link<(), (), T, E> where
F: Future<Item = T, Error = E> + Send + 'static,
T: Send + 'static,
E: Send + 'static,
F: Future<Item = T, Error = E> + Send + 'static,
T: Send + 'static,
E: Send + 'static,
Spawns a linked fiber. Read more
fn boxed(self) -> BoxSpawn where
Self: Sized + Send + 'static,
Self: Sized + Send + 'static,
Converts this instance into a boxed object.