Skip to content

Commit 4af5ea6

Browse files
async-global-executor added
1 parent 8cc0f5c commit 4af5ea6

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

.github/workflows/sqlx.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-24.04
2222
strategy:
2323
matrix:
24-
runtime: [ async-global-executor, async-std, smol, tokio ]
24+
runtime: [ smol, tokio ]
2525
tls: [ native-tls, rustls, none ]
2626
steps:
2727
- uses: actions/checkout@v4
@@ -118,7 +118,7 @@ jobs:
118118
runs-on: ubuntu-24.04
119119
strategy:
120120
matrix:
121-
runtime: [ async-global-executor, async-std, smol, tokio ]
121+
runtime: [ smol, tokio ]
122122
linking: [ sqlite, sqlite-unbundled ]
123123
needs: check
124124
steps:
@@ -187,7 +187,7 @@ jobs:
187187
strategy:
188188
matrix:
189189
postgres: [ 17, 13 ]
190-
runtime: [ async-global-executor, async-std, smol, tokio ]
190+
runtime: [ smol, tokio ]
191191
tls: [ native-tls, rustls-aws-lc-rs, rustls-ring, none ]
192192
needs: check
193193
steps:
@@ -288,7 +288,7 @@ jobs:
288288
strategy:
289289
matrix:
290290
mysql: [ 8 ]
291-
runtime: [ async-global-executor, async-std, smol, tokio ]
291+
runtime: [ smol, tokio ]
292292
tls: [ native-tls, rustls-aws-lc-rs, rustls-ring, none ]
293293
needs: check
294294
steps:
@@ -377,7 +377,7 @@ jobs:
377377
strategy:
378378
matrix:
379379
mariadb: [ verylatest, 11_4, 10_11, 10_4 ]
380-
runtime: [ async-global-executor, async-std, smol, tokio ]
380+
runtime: [ smol, tokio ]
381381
tls: [ native-tls, rustls-aws-lc-rs, rustls-ring, none ]
382382
needs: check
383383
steps:

sqlx-core/src/rt/mod.rs

+7-14
Original file line numberDiff line numberDiff line change
@@ -158,24 +158,17 @@ pub async fn yield_now() {
158158

159159
#[track_caller]
160160
pub fn test_block_on<F: Future>(f: F) -> F::Output {
161-
#[cfg(feature = "_rt-tokio")]
162-
{
163-
if rt_tokio::available() {
164-
return tokio::runtime::Builder::new_current_thread()
165-
.enable_all()
166-
.build()
167-
.expect("failed to start Tokio runtime")
168-
.block_on(f);
169-
}
170-
}
171-
172161
cfg_if! {
173-
if #[cfg(feature = "_rt-async-global-executor")] {
174-
async_io_global_executor::block_on(f)
175-
} else if #[cfg(feature = "_rt-async-std")] {
162+
if #[cfg(feature = "_rt-async-std")] {
176163
async_std::task::block_on(f)
177164
} else if #[cfg(feature = "_rt-smol")] {
178165
smol::block_on(f)
166+
} else if #[cfg(feature = "_rt-tokio")] {
167+
tokio::runtime::Builder::new_current_thread()
168+
.enable_all()
169+
.build()
170+
.expect("failed to start Tokio runtime")
171+
.block_on(f)
179172
} else {
180173
missing_rt(f)
181174
}

0 commit comments

Comments
 (0)