From 95f2611049b7bba261d98461d9ddd43baa7b8fc9 Mon Sep 17 00:00:00 2001 From: Harald Kube Date: Thu, 25 Feb 2021 21:51:51 +0100 Subject: [PATCH] Add comment to explain why we sleep a little after spawning the thread. --- src/rest_api_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest_api_test.rs b/src/rest_api_test.rs index 06a3c21..cb86f2e 100644 --- a/src/rest_api_test.rs +++ b/src/rest_api_test.rs @@ -24,7 +24,7 @@ lazy_static! { let hdl = Arc::new(Mutex::new(Some(thread::spawn(move || { task::block_on(start(&config.clone())).unwrap(); })))); - println!("Server thread spawned"); + // Have a nap to let the scheduler start the new thread thread::sleep(std::time::Duration::from_millis(5)); hdl };