diff --git a/src/io/stderr.rs b/src/io/stderr.rs index b3cc711..8986d48 100644 --- a/src/io/stderr.rs +++ b/src/io/stderr.rs @@ -122,7 +122,7 @@ impl Stderr { pub async fn lock(&self) -> StderrLock<'static> { static STDERR: Lazy = Lazy::new(std::io::stderr); - blocking::spawn(move || StderrLock(STDERR.lock())).await + spawn_blocking(move || StderrLock(STDERR.lock())).await } } diff --git a/src/io/stdin.rs b/src/io/stdin.rs index a72d055..d7b2690 100644 --- a/src/io/stdin.rs +++ b/src/io/stdin.rs @@ -178,7 +178,7 @@ impl Stdin { pub async fn lock(&self) -> StdinLock<'static> { static STDIN: Lazy = Lazy::new(std::io::stdin); - blocking::spawn(move || StdinLock(STDIN.lock())).await + spawn_blocking(move || StdinLock(STDIN.lock())).await } } diff --git a/src/io/stdout.rs b/src/io/stdout.rs index 99c636d..c6281d7 100644 --- a/src/io/stdout.rs +++ b/src/io/stdout.rs @@ -122,7 +122,7 @@ impl Stdout { pub async fn lock(&self) -> StdoutLock<'static> { static STDOUT: Lazy = Lazy::new(std::io::stdout); - blocking::spawn(move || StdoutLock(STDOUT.lock())).await + spawn_blocking(move || StdoutLock(STDOUT.lock())).await } }