From 217170e11e8d9a970e9d5d1e0192439e1d4d3526 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 19 Dec 2019 07:07:39 +0100 Subject: [PATCH] src/server/worker_task.rs: set worker thread name This gives better logs on thread panic... --- src/server/worker_task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/worker_task.rs b/src/server/worker_task.rs index 5a07c98a..7be02ab5 100644 --- a/src/server/worker_task.rs +++ b/src/server/worker_task.rs @@ -439,7 +439,7 @@ impl WorkerTask { let worker = WorkerTask::new(worker_type, worker_id, username, to_stdout)?; let upid_str = worker.upid.to_string(); - let _child = std::thread::spawn(move || { + let _child = std::thread::Builder::new().name(upid_str.clone()).spawn(move || { let worker1 = worker.clone(); let result = match std::panic::catch_unwind(move || f(worker1)) { Ok(r) => r,