upgrade tokio to latest version(v0.3)
This commit is contained in:
parent
e6131783e9
commit
eacb2e913f
|
@ -7,6 +7,6 @@ publish = false
|
|||
|
||||
[dependencies]
|
||||
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
|
||||
tokio = { version = "0.2", features = ["blocking"] }
|
||||
tokio = { version = "0.3", features = ["sync"] }
|
||||
itertools = "0.9"
|
||||
rustc-hash = "1.1"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -16,6 +16,7 @@ impl Executor for Tokio {
|
|||
}
|
||||
|
||||
fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
|
||||
tokio::runtime::Runtime::enter(self, f)
|
||||
let _guard = tokio::runtime::Runtime::enter(self);
|
||||
f()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ mod platform {
|
|||
}
|
||||
|
||||
fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
|
||||
self.0.enter(f)
|
||||
let _guard = self.0.enter();
|
||||
f()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue