Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e812663

Browse files
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎src/task/mod.rs

Lines changed: 0 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /