Skip to content
This repository was archived by the owner on Jun 29, 2026. It is now read-only.

Commit 4044279

Browse files
committed
fix: Use tokio::time::sleep instead of std::thread::sleep
std::thread::sleep blocks the entire tokio worker thread. Since main is already async, use the non-blocking alternative.
1 parent de9b1b1 commit 4044279

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async fn main() {
6868
if !next_run_sleep.is_zero() {
6969
tracing::info!(?next_run, "scheduling next run...");
7070
}
71-
std::thread::sleep(next_run_sleep);
71+
tokio::time::sleep(next_run_sleep).await;
7272

7373
let system_information = SystemInformation::collect(&mut collect_ctx).await;
7474

0 commit comments

Comments
 (0)