Skip to content

Commit ae47d03

Browse files
committed
Give the router proxy thread a name
This makes debugging easier when panics occur inside the thread. Signed-off-by: Simon Wülker <[email protected]>
1 parent b10727a commit ae47d03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/router.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ impl RouterProxy {
4747
// Router proxy takes both sending ends.
4848
let (msg_sender, msg_receiver) = crossbeam_channel::unbounded();
4949
let (wakeup_sender, wakeup_receiver) = ipc::channel().unwrap();
50-
thread::spawn(move || Router::new(msg_receiver, wakeup_receiver).run());
50+
thread::Builder::new()
51+
.name("router-proxy".to_string())
52+
.spawn(move || Router::new(msg_receiver, wakeup_receiver).run())
53+
.expect("Failed to spawn router proxy thread");
5154
RouterProxy {
5255
comm: Mutex::new(RouterProxyComm {
5356
msg_sender,

0 commit comments

Comments
 (0)