This commit is contained in:
k-nasa 2019-11-02 01:27:27 +09:00
parent 0661f774c2
commit 81873ae5f3
3 changed files with 3 additions and 3 deletions

View file

@ -122,7 +122,7 @@ impl Stderr {
pub async fn lock(&self) -> StderrLock<'static> {
static STDERR: Lazy<std::io::Stderr> = Lazy::new(std::io::stderr);
blocking::spawn(move || StderrLock(STDERR.lock())).await
spawn_blocking(move || StderrLock(STDERR.lock())).await
}
}

View file

@ -178,7 +178,7 @@ impl Stdin {
pub async fn lock(&self) -> StdinLock<'static> {
static STDIN: Lazy<std::io::Stdin> = Lazy::new(std::io::stdin);
blocking::spawn(move || StdinLock(STDIN.lock())).await
spawn_blocking(move || StdinLock(STDIN.lock())).await
}
}

View file

@ -122,7 +122,7 @@ impl Stdout {
pub async fn lock(&self) -> StdoutLock<'static> {
static STDOUT: Lazy<std::io::Stdout> = Lazy::new(std::io::stdout);
blocking::spawn(move || StdoutLock(STDOUT.lock())).await
spawn_blocking(move || StdoutLock(STDOUT.lock())).await
}
}