fix: replace std::thread::sleep with tokio::time::sleep in async context (#831)
The `execute` method of `ShellWaitTool` is async, but used `std::thread::sleep` which blocks the tokio worker thread. Replace with `tokio::time::sleep().await` so other tasks can make progress during the 50ms poll interval.
This commit is contained in:
@@ -2438,7 +2438,7 @@ impl ToolSpec for ShellInteractTool {
|
||||
return Ok(build_shell_delta_tool_result(delta));
|
||||
}
|
||||
|
||||
std::thread::sleep(Duration::from_millis(50));
|
||||
tokio::time::sleep(Duration::from_millis(50)).await;
|
||||
elapsed = elapsed.saturating_add(50);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user