/// Sends the given future to the executor associated to this scheduler
///
/// Returns an error if the the executor not longer exists.
Sends the given future to the executor associated to this scheduler
Returns an error if the the executor not longer exists.
Sends the given future to the executor associated to this scheduler Returns an error if the the executor not longer exists .
pub fn schedule<Fut: 'static>(&self, future: Fut) -> Result<(), ExecutorDestroyed>
    where
        Fut: Future<Output = T>,
    {
        let obj = LocalFutureObj::new(Box::new(future));
        self.sender.send(obj).map_err(|_| ExecutorDestroyed)
    }
pub fn schedule < Fut : ' static > ( & self , future : Fut ) -> Result < ( ) , ExecutorDestroyed > where Fut : Future < Output = T > , { let obj = LocalFutureObj :: new ( Box :: new ( future ) ) ; self . sender . send ( obj ) . map_err ( | _ | ExecutorDestroyed ) }
Sends the given future to the executor associated to this scheduler
Returns an error if the the executor not longer exists.
Sends the given future to the executor associated to this scheduler Returns an error if the the executor not longer exists .
&self
future
Fut