mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-04 09:09:41 +00:00
commit
03ddd0a869
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ surf = { version = "1.0.3", optional = true }
|
||||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||||
async-executor = { version = "0.1.2", features = ["async-io"], optional = true }
|
async-executor = { version = "0.1.2", features = ["async-io"], optional = true }
|
||||||
async-io = { version = "0.1.8", optional = true }
|
async-io = { version = "0.1.8", optional = true }
|
||||||
blocking = { version = "0.5.0", optional = true }
|
blocking = { version = "0.5.2", optional = true }
|
||||||
futures-lite = { version = "0.1.8", optional = true }
|
futures-lite = { version = "0.1.8", optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
|
|
|
@ -35,5 +35,5 @@ where
|
||||||
F: FnOnce() -> T + Send + 'static,
|
F: FnOnce() -> T + Send + 'static,
|
||||||
T: Send + 'static,
|
T: Send + 'static,
|
||||||
{
|
{
|
||||||
task::spawn(async move { blocking::unblock!(f()) })
|
task::spawn(blocking::unblock(f))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue