From 8e73c0f6940288c4a24a102a7ba9f20eb6bd754f Mon Sep 17 00:00:00 2001 From: Ron Waldon-Howe Date: Wed, 17 Jan 2024 09:02:02 +1100 Subject: [PATCH] fix: rely on channels for synchronisation/sequence instead of `sleep()` --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9131bc6..75e7869 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ use tokio::{ mpsc::{self, Receiver, Sender}, oneshot, Mutex, }, - time::{sleep, Duration}, + time::Duration, }; use tokio_util::sync::CancellationToken; use tracing::{metadata::LevelFilter, Instrument}; @@ -113,8 +113,6 @@ async fn start( ) .wrap_err("failed to start compositor")?; - sleep(Duration::from_millis(2000)).await; - let mut env_vars = env_rx .await .expect("failed to receive environmental variables")