diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-10-03 18:51:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 12:51:25 +0200 |
commit | c191ca1aeb58a07fe13e5806a7c443ce93e57dd5 (patch) | |
tree | 480ae02aacf5a11d89837d67999d139317a18f15 /cli/main.rs | |
parent | 59312f393690817ed1d4e2ba1c940eafc56b3588 (diff) |
fix(cli/repl): put the thread to sleep when idle (#7804)
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/main.rs b/cli/main.rs index 4546bc374..6bae9c2d7 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; + } } } } |