1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(cli/repl): put the thread to sleep when idle (#7804)

This commit is contained in:
Casper Beyer 2020-10-03 18:51:25 +08:00 committed by GitHub
parent 59312f3936
commit c191ca1aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -447,7 +447,9 @@ async fn run_repl(flags: Flags) -> Result<(), AnyError> {
result = &mut repl => {
return result;
}
_ = &mut *worker => {}
_ = &mut *worker => {
tokio::time::delay_for(tokio::time::Duration::from_millis(10)).await;
}
}
}
}