mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
wasm: use build script to detect wasm (#4865)
Co-authored-by: Taiki Endo <[email protected]>
This commit is contained in:
@@ -125,7 +125,7 @@ const KEEP_ALIVE: Duration = Duration::from_secs(10);
|
||||
/// Tasks will be scheduled as non-mandatory, meaning they may not get executed
|
||||
/// in case of runtime shutdown.
|
||||
#[track_caller]
|
||||
#[cfg_attr(target_os = "wasi", allow(dead_code))]
|
||||
#[cfg_attr(tokio_wasi, allow(dead_code))]
|
||||
pub(crate) fn spawn_blocking<F, R>(func: F) -> JoinHandle<R>
|
||||
where
|
||||
F: FnOnce() -> R + Send + 'static,
|
||||
|
||||
Reference in New Issue
Block a user