Add comment to explain why we sleep a little after spawning the thread.

This commit is contained in:
Harald Kube 2021-02-25 21:51:51 +01:00
parent 1c7103a512
commit 95f2611049

View file

@ -24,7 +24,7 @@ lazy_static! {
let hdl = Arc::new(Mutex::new(Some(thread::spawn(move || { let hdl = Arc::new(Mutex::new(Some(thread::spawn(move || {
task::block_on(start(&config.clone())).unwrap(); 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)); thread::sleep(std::time::Duration::from_millis(5));
hdl hdl
}; };