From 491d38d06764c3c596ee69e983a3d5fa5fc2fa69 Mon Sep 17 00:00:00 2001 From: Mathieu Amiot Date: Tue, 8 Mar 2022 15:01:11 +0100 Subject: [PATCH] Prevent spurious wakeups by looping on park() --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c25ce81..eb12938 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(())