diff --git a/README.md b/README.md index 44e08e8..5ef5ad4 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ For this example, in addition to tarpc, also add two other dependencies to your `Cargo.toml`: ```toml -futures-preview = "0.3.0-alpha.17" -tokio = "0.2.0-alpha.1" +futures-preview = "0.3.0-alpha.18" +tokio = "0.2.0-alpha.2" ``` In the following example, we use an in-process channel for communication between diff --git a/bincode-transport/Cargo.toml b/bincode-transport/Cargo.toml index 418a647..95a378e 100644 --- a/bincode-transport/Cargo.toml +++ b/bincode-transport/Cargo.toml @@ -13,7 +13,7 @@ readme = "../README.md" description = "A bincode-based transport for tarpc services." [dependencies] -futures-preview = { version = "0.3.0-alpha.17", features = ["compat"] } +futures-preview = { version = "0.3.0-alpha.18", features = ["compat"] } futures_legacy = { version = "0.1", package = "futures" } pin-utils = "0.1.0-alpha.4" serde = "1.0" @@ -22,5 +22,5 @@ async-bincode = "0.4" tokio-tcp = "0.1" [dev-dependencies] -futures-test-preview = { version = "0.3.0-alpha.17" } +futures-test-preview = { version = "0.3.0-alpha.18" } assert_matches = "1.0" diff --git a/example-service/Cargo.toml b/example-service/Cargo.toml index 871f68b..1da57ab 100644 --- a/example-service/Cargo.toml +++ b/example-service/Cargo.toml @@ -15,10 +15,10 @@ description = "An example server built on tarpc." [dependencies] tarpc-json-transport = { version = "0.1", path = "../json-transport" } clap = "2.0" -futures-preview = { version = "0.3.0-alpha.17" } +futures-preview = { version = "0.3.0-alpha.18" } serde = { version = "1.0" } tarpc = { version = "0.18", path = "../tarpc", features = ["serde1"] } -tokio = "0.2.0-alpha.1" +tokio = "0.2.0-alpha.2" env_logger = "0.6" [lib] diff --git a/json-transport/Cargo.toml b/json-transport/Cargo.toml index 19d6185..3f95c35 100644 --- a/json-transport/Cargo.toml +++ b/json-transport/Cargo.toml @@ -13,7 +13,7 @@ readme = "../README.md" description = "A JSON-based transport for tarpc services." [dependencies] -futures-preview = { version = "0.3.0-alpha.17", features = ["compat"] } +futures-preview = { version = "0.3.0-alpha.18", features = ["compat"] } futures_legacy = { version = "0.1", package = "futures" } pin-utils = "0.1.0-alpha.4" serde = "1.0" @@ -24,5 +24,5 @@ tokio-serde-json = "0.2" tokio-tcp = "0.1" [dev-dependencies] -futures-test-preview = { version = "0.3.0-alpha.17" } +futures-test-preview = { version = "0.3.0-alpha.18" } assert_matches = "1.0" diff --git a/plugins/Cargo.toml b/plugins/Cargo.toml index 3901d90..c1b892e 100644 --- a/plugins/Cargo.toml +++ b/plugins/Cargo.toml @@ -27,6 +27,6 @@ proc-macro2 = "0.4" proc-macro = true [dev-dependencies] -futures-preview = { version = "0.3.0-alpha.17" } +futures-preview = { version = "0.3.0-alpha.18" } serde = { version = "1.0", features = ["derive"] } tarpc = { path = "../tarpc" } diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index bd24f8f..2d564bb 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -19,17 +19,17 @@ tokio1 = ["tokio"] [dependencies] fnv = "1.0" -futures-preview = { version = "0.3.0-alpha.17" } +futures-preview = { version = "0.3.0-alpha.18" } humantime = "1.0" log = "0.4" pin-utils = "0.1.0-alpha.4" rand = "0.7" -tokio-timer = "0.3.0-alpha.1" +tokio-timer = "0.3.0-alpha.2" trace = { package = "tarpc-trace", version = "0.2", path = "../trace" } serde = { optional = true, version = "1.0" } -tokio = { optional = true, version = "0.2.0-alpha.1" } +tokio = { optional = true, version = "0.2.0-alpha.2" } [dev-dependencies] -futures-test-preview = { version = "0.3.0-alpha.17" } +futures-test-preview = { version = "0.3.0-alpha.18" } env_logger = "0.6" assert_matches = "1.0" diff --git a/rpc/src/client/channel.rs b/rpc/src/client/channel.rs index a343775..e07c107 100644 --- a/rpc/src/client/channel.rs +++ b/rpc/src/client/channel.rs @@ -751,11 +751,12 @@ mod tests { { pin_utils::pin_mut!(resp); let timer = tokio_timer::Timer::default(); - tokio_timer::with_default(&timer.handle(), || { - let _ = resp - .as_mut() - .poll(&mut Context::from_waker(&noop_waker_ref())); - }); + let handle = timer.handle(); + let _guard = tokio_timer::set_default(&handle); + + let _ = resp + .as_mut() + .poll(&mut Context::from_waker(&noop_waker_ref())); // End of block should cause resp.drop() to run, which should send a cancel message. } assert!(canceled_requests.0.try_next().unwrap() == Some(3)); diff --git a/tarpc/Cargo.toml b/tarpc/Cargo.toml index 592728b..fe9773e 100644 --- a/tarpc/Cargo.toml +++ b/tarpc/Cargo.toml @@ -31,12 +31,11 @@ bincode = "1.0" tarpc-bincode-transport = { version = "0.7", path = "../bincode-transport" } bytes = { version = "0.4", features = ["serde"] } env_logger = "0.6" -futures-preview = { version = "0.3.0-alpha.17" } +futures-preview = { version = "0.3.0-alpha.18" } humantime = "1.0" log = "0.4" -tokio-tcp = "0.2.0-alpha.1" pin-utils = "0.1.0-alpha.4" -tokio = "0.2.0-alpha.1" +tokio = "0.2.0-alpha.2" [[example]] name = "server_calling_server" diff --git a/tarpc/src/lib.rs b/tarpc/src/lib.rs index 92542a0..5025c91 100644 --- a/tarpc/src/lib.rs +++ b/tarpc/src/lib.rs @@ -63,8 +63,8 @@ //! your `Cargo.toml`: //! //! ```toml -//! futures-preview = "0.3.0-alpha.17" -//! tokio = "0.2.0-alpha.1" +//! futures-preview = "0.3.0-alpha.18" +//! tokio = "0.2.0-alpha.2" //! ``` //! //! In the following example, we use an in-process channel for communication between