diff options
-rw-r--r-- | src/main.rs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/main.rs b/src/main.rs index 5837426..6e37938 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,18 +76,20 @@ fn spawn_system(system_name : &String, system_config: config::System, waker: mps let name = system_name.clone(); let config = system_config.clone(); - thread::spawn(move || -> _ { - let thread_local_runtime = runtime::Builder::new_current_thread().enable_all().build().unwrap(); - - // TODO: allow system manager runtime to return a command - thread_local_runtime.block_on(async { - let mut system = Manager::new(name, config); - system.start_clients().await; - }); - - let _ = waker.send(()); - SystemThreadCommand::Restart - }) + thread::Builder::new() + .name(format!("seance_{}", &name)) + .spawn(move || -> _ { + let thread_local_runtime = runtime::Builder::new_current_thread().enable_all().build().unwrap(); + + // TODO: allow system manager runtime to return a command + thread_local_runtime.block_on(async { + let mut system = Manager::new(name, config); + system.start_clients().await; + }); + + let _ = waker.send(()); + SystemThreadCommand::Restart + }).unwrap() } |