Fix spin lock

This commit is contained in:
Gregory Schier
2024-07-27 09:05:43 -07:00
parent 54090614ad
commit f925a0cc54
3 changed files with 10 additions and 5 deletions

View File

@@ -75,6 +75,7 @@ pub async fn node_start<R: Runtime>(
// Check on child
tokio::spawn(async move {
loop {
// Small sleep so we don't spin lock the CPU
tokio::time::sleep(Duration::from_millis(50)).await;
if let Ok(Some(status)) = child.try_wait() {
error!("Plugin runtime exited status={}", status);