From eacb2e913fdbfe7af735ec0f4041599a87ad318a Mon Sep 17 00:00:00 2001 From: valbendan Date: Thu, 5 Nov 2020 11:36:23 +0800 Subject: upgrade tokio to latest version(v0.3) --- futures/Cargo.toml | 4 ++-- futures/src/executor/tokio.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'futures') diff --git a/futures/Cargo.toml b/futures/Cargo.toml index 275d0391..078c96aa 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -20,9 +20,9 @@ log = "0.4" version = "0.3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] -version = "0.2" +version = "0.3" optional = true -features = ["rt-core", "rt-threaded", "time", "stream"] +features = ["rt-multi-thread", "time", "stream"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.async-std] version = "1.0" diff --git a/futures/src/executor/tokio.rs b/futures/src/executor/tokio.rs index a730bce8..c6a21cec 100644 --- a/futures/src/executor/tokio.rs +++ b/futures/src/executor/tokio.rs @@ -16,6 +16,7 @@ impl Executor for Tokio { } fn enter(&self, f: impl FnOnce() -> R) -> R { - tokio::runtime::Runtime::enter(self, f) + let _guard = tokio::runtime::Runtime::enter(self); + f() } } -- cgit