pub fn spawn<F: Future<Item = (), Error = ()> + Send + 'static>(&self, future: F) {
    // Make sure to copy our (thread-local) logging destination into the task.
    // When a daemon thread kicks off a future, it should log like a daemon thread (and similarly
    // for a user-facing thread).
    let logging_destination = logging::get_destination();
    self
      .runtime
      .get()
      .read()
      .executor()
      .spawn(futures::future::ok(()).and_then(move |()| {
        logging::set_destination(logging_destination);
        future
      }))
  }
///
/// Start running a Future on a tokio Runtime.
///
Start running a Future on a tokio Runtime.
Start running a Future on a tokio Runtime .
pub fn spawn<F: Future<Item = (), Error = ()> + Send + 'static>(&self, future: F) {
    // Make sure to copy our (thread-local) logging destination into the task.
    // When a daemon thread kicks off a future, it should log like a daemon thread (and similarly
    // for a user-facing thread).
    let logging_destination = logging::get_destination();
    self
      .runtime
      .get()
      .read()
      .executor()
      .spawn(futures::future::ok(()).and_then(move |()| {
        logging::set_destination(logging_destination);
        future
      }))
  }
pub fn spawn < F : Future < Item = ( ) , Error = ( ) > + Send + ' static > ( & self , future : F ) { // Make sure to copy our (thread-local) logging destination into the task. // When a daemon thread kicks off a future, it should log like a daemon thread (and similarly // for a user-facing thread). let logging_destination = logging :: get_destination ( ) ; self . runtime . get ( ) . read ( ) . executor ( ) . spawn ( futures :: future :: ok ( ( ) ) . and_then ( move | ( ) | { logging :: set_destination ( logging_destination ) ; future } ) ) }
Start running a Future on a tokio Runtime.
Start running a Future on a tokio Runtime .
&self
future
F
&self
future
F