Skip to content

Commit e812663

Browse files
authored
Merge pull request #882 from Keruspe/tokio-fix
fix tokio compatibility
2 parents 4de2d12 + 3e94498 commit e812663

File tree

4 files changed

+3
-46
lines changed

4 files changed

+3
-46
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ alloc = [
5757
"futures-core/alloc",
5858
"pin-project-lite",
5959
]
60-
tokio02 = ["tokio"]
60+
tokio02 = ["async-global-executor/tokio02"]
6161

6262
[dependencies]
6363
async-attributes = { version = "1.1.1", optional = true }
@@ -78,7 +78,7 @@ slab = { version = "0.4.2", optional = true }
7878
surf = { version = "1.0.3", optional = true }
7979

8080
[target.'cfg(not(target_os = "unknown"))'.dependencies]
81-
async-global-executor = { version = "1.0.2", optional = true, features = ["async-io"] }
81+
async-global-executor = { version = "1.2.1", optional = true, features = ["async-io"] }
8282
async-io = { version = "1.0.1", optional = true }
8383
blocking = { version = "1.0.0", optional = true }
8484
futures-lite = { version = "1.0.0", optional = true }

src/task/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl Builder {
168168
TaskLocalsWrapper::set_current(&wrapped.tag, || {
169169
let res = if should_run {
170170
// The first call should run the executor
171-
crate::task::executor::run(wrapped)
171+
async_global_executor::block_on(wrapped)
172172
} else {
173173
futures_lite::future::block_on(wrapped)
174174
};

src/task/executor.rs

-41
This file was deleted.

src/task/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ cfg_default! {
148148
mod block_on;
149149
mod builder;
150150
mod current;
151-
#[cfg(not(target_os = "unknown"))]
152-
pub(crate) mod executor;
153151
mod join_handle;
154152
mod sleep;
155153
#[cfg(not(target_os = "unknown"))]

0 commit comments

Comments
 (0)