pub fn spawn<F>(&mut self, future: F) -> &mut Self
    where
        F: Future<Item = (), Error = ()> + Send + 'static,
    {
        match *self {
            MainRuntime::CurrentThread(ref mut rt) => {
                rt.spawn(future);
            }
            MainRuntime::ThreadPool(ref mut rt) => {
                rt.spawn(future);
            }
        };
        self
    }
/// Spawn a task on this runtime.
Spawn a task on this runtime.
Spawn a task on this runtime .
pub fn spawn<F>(&mut self, future: F) -> &mut Self
    where
        F: Future<Item = (), Error = ()> + Send + 'static,
    {
        match *self {
            MainRuntime::CurrentThread(ref mut rt) => {
                rt.spawn(future);
            }
            MainRuntime::ThreadPool(ref mut rt) => {
                rt.spawn(future);
            }
        };
        self
    }
pub fn spawn < F > ( & mut self , future : F ) -> & mut Self where F : Future < Item = ( ) , Error = ( ) > + Send + ' static , { match * self { MainRuntime :: CurrentThread ( ref mut rt ) => { rt . spawn ( future ) ; } MainRuntime :: ThreadPool ( ref mut rt ) => { rt . spawn ( future ) ; } } ; self }
Spawn a task on this runtime.
Spawn a task on this runtime .
&mut self
future
F
&mut self
future
F