Skip to content

Commit

Permalink
Prevent spurious wakeups by looping on park()
Browse files Browse the repository at this point in the history
  • Loading branch information
OtaK committed Mar 8, 2022
1 parent 087ba2b commit 491d38d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ fn main() -> TimersetResult<()> {
}
drop(args);
info!("Cleaned up resources and parking till the end of time...");
std::thread::park();
loop {
std::thread::park();
}
}

Ok(())
Expand Down

0 comments on commit 491d38d

Please sign in to comment.