From c191ca1aeb58a07fe13e5806a7c443ce93e57dd5 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Sat, 3 Oct 2020 18:51:25 +0800 Subject: [PATCH] fix(cli/repl): put the thread to sleep when idle (#7804) --- cli/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/main.rs b/cli/main.rs index 4546bc3748..6bae9c2d73 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -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; + } } } }