Struct tokio_current_thread::Handle [−][src]
Handle to spawn a future on the corresponding CurrentThread
instance
Methods
impl Handle
[src]
[−]
impl Handle
pub fn spawn<F>(&self, future: F) -> Result<(), SpawnError> where
F: Future<Item = (), Error = ()> + Send + 'static,
[src]
[−]
pub fn spawn<F>(&self, future: F) -> Result<(), SpawnError> where
F: Future<Item = (), Error = ()> + Send + 'static,
Spawn a future onto the CurrentThread
instance corresponding to this handle
Panics
This function panics if the spawn fails. Failure occurs if the CurrentThread
instance of the Handle
does not exist anymore.