Skip to content

Commit aa23ce7

Browse files
committed
use StaticExecutor
1 parent 60c7c69 commit aa23ce7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ tokio = ["dep:tokio"]
2020

2121
[dependencies]
2222
async-channel = "^2.1.1"
23-
async-executor = "^1.8"
2423
async-lock = "^3.2"
2524
blocking = "^1.5"
2625
futures-lite = "^2.0"
2726
once_cell = "^1.4"
2827

28+
[dependencies.async-executor]
29+
version = "^1.12"
30+
features = ["static"]
31+
2932
[dependencies.async-io]
3033
version = "^2.2.1"
3134
optional = true

src/executor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::Task;
2-
use async_executor::{Executor, LocalExecutor};
2+
use async_executor::{LocalExecutor, StaticExecutor};
33
use std::future::Future;
44

5-
pub(crate) static GLOBAL_EXECUTOR: Executor<'_> = Executor::new();
5+
pub(crate) static GLOBAL_EXECUTOR: StaticExecutor = StaticExecutor::new();
66

77
thread_local! {
88
pub(crate) static LOCAL_EXECUTOR: LocalExecutor<'static> = const { LocalExecutor::new() };

0 commit comments

Comments
 (0)