summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAshelyn Rose <git@ashen.earth>2024-10-07 21:40:22 -0600
committerAshelyn Rose <git@ashen.earth>2024-10-07 21:40:22 -0600
commit9da2bb7561210ace25ea7cabbb455d0abc26dbe9 (patch)
tree537799936b3a88ba1a750b3043deb8ae5a2f3227 /src/main.rs
parent719047ec58ab4777eb49ae9121eb15a9b5a3ea0d (diff)
Name threads
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
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()
 }