Update tokio to v0.2.0-alpha.1

As part of this, I made an optional tokio feature which, when enabled,
adds utility functions that spawn on the default tokio executor. This
allows for the removal of the runtime crate.

On the one hand, this makes the spawning utils slightly less generic. On
the other hand:

- The fns are just helpers and are easily rewritten by the user.
- Tokio is the clear dominant futures executor, so most people will just
  use these versions.
This commit is contained in:
Tim Kuehn
2019-08-08 21:49:33 -07:00
parent 75d1e877be
commit 41c1aafaf7
20 changed files with 103 additions and 311 deletions

View File

@@ -10,7 +10,7 @@ use clap::{App, Arg};
use std::io;
use tarpc::{client, context};
#[runtime::main(runtime_tokio::Tokio)]
#[tokio::main]
async fn main() -> io::Result<()> {
let flags = App::new("Hello Client")
.version("0.1")

View File

@@ -37,7 +37,7 @@ impl World for HelloServer {
}
}
#[runtime::main(runtime_tokio::Tokio)]
#[tokio::main]
async fn main() -> io::Result<()> {
env_logger::init();