From df299ced4573c7e91fa37dd2d0cb308de81a5b5e Mon Sep 17 00:00:00 2001 From: Stjepan Glavina Date: Sat, 5 Jan 2019 16:53:38 +0100 Subject: [PATCH] threadpool: panic if a worker thread cannot be spawned (#826) --- tokio-threadpool/src/pool/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio-threadpool/src/pool/mod.rs b/tokio-threadpool/src/pool/mod.rs index eb48e349827..bb9fd6a2598 100644 --- a/tokio-threadpool/src/pool/mod.rs +++ b/tokio-threadpool/src/pool/mod.rs @@ -397,7 +397,8 @@ impl Pool { }); if let Err(e) = res { - warn!("failed to spawn worker thread; err={:?}", e); + error!("failed to spawn worker thread; err={:?}", e); + panic!("failed to spawn worker thread: {:?}", e); } }