mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-06 04:35:32 +00:00
switch to futures-lite
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
parent
2fe087bd0a
commit
48693fccc3
3 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@ default = [
|
|||
"async-io",
|
||||
"async-task",
|
||||
"blocking",
|
||||
"futures-lite",
|
||||
"kv-log-macro",
|
||||
"log",
|
||||
"num_cpus",
|
||||
|
@ -81,6 +82,7 @@ surf = { version = "1.0.3", optional = true }
|
|||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
async-io = { version = "0.1.5", optional = true }
|
||||
blocking = { version = "0.5.0", optional = true }
|
||||
futures-lite = { version = "0.1.8", optional = true }
|
||||
smol = { version = "0.1.17", optional = true }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
|
|
|
@ -315,7 +315,7 @@ impl Drop for File {
|
|||
// non-blocking fashion, but our only other option here is losing data remaining in the
|
||||
// write cache. Good task schedulers should be resilient to occasional blocking hiccups in
|
||||
// file destructors so we don't expect this to be a common problem in practice.
|
||||
let _ = smol::block_on(self.flush());
|
||||
let _ = futures_lite::future::block_on(self.flush());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ impl Builder {
|
|||
// The first call should use run.
|
||||
smol::run(wrapped)
|
||||
} else {
|
||||
smol::block_on(wrapped)
|
||||
futures_lite::future::block_on(wrapped)
|
||||
};
|
||||
num_nested_blocking.replace(num_nested_blocking.get() - 1);
|
||||
res
|
||||
|
|
Loading…
Reference in a new issue