Skip to content

Commit 8db95ba

Browse files
committed
switch to parking
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
1 parent 98c08f8 commit 8db95ba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ default = [
3131
"log",
3232
"multitask",
3333
"num_cpus",
34+
"parking",
3435
"pin-project-lite",
3536
]
3637
docs = ["attributes", "unstable", "default"]
@@ -82,6 +83,7 @@ surf = { version = "1.0.3", optional = true }
8283
async-io = { version = "0.1.2", optional = true }
8384
blocking = { version = "0.4.6", optional = true }
8485
multitask = { version = "0.2.0", optional = true }
86+
parking = { version = "1.0.5", optional = true }
8587

8688
[target.'cfg(target_arch = "wasm32")'.dependencies]
8789
futures-timer = { version = "3.0.2", optional = true, features = ["wasm-bindgen"] }

src/task/executor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ static GLOBAL_EXECUTOR: once_cell::sync::Lazy<multitask::Executor> = once_cell::
66

77
struct Executor {
88
local_executor: multitask::LocalExecutor,
9-
parker: async_io::parking::Parker,
9+
parker: parking::Parker,
1010
}
1111

1212
thread_local! {
1313
static EXECUTOR: RefCell<Executor> = RefCell::new({
14-
let (parker, unparker) = async_io::parking::pair();
14+
let (parker, unparker) = parking::pair();
1515
let local_executor = multitask::LocalExecutor::new(move || unparker.unpark());
1616
Executor { local_executor, parker }
1717
});

0 commit comments

Comments
 (0)