tokio 0.2.0-alpha.2

This commit is contained in:
Artem Vorotnikov
2019-08-19 21:54:01 +03:00
committed by Tim
parent f38a172523
commit 5aa4a2cef6
9 changed files with 23 additions and 23 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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]

View File

@@ -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"

View File

@@ -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" }

View File

@@ -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"

View File

@@ -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));

View File

@@ -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"

View File

@@ -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