From 089eeae24b660ba22245fd2ae7e55510a0cc34ba Mon Sep 17 00:00:00 2001 From: Matthew Pomes Date: Wed, 12 Jan 2022 12:49:57 -0600 Subject: [PATCH] runtime: add better error message when spawning blocking threads (#4398) --- tokio/src/runtime/blocking/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/runtime/blocking/pool.rs b/tokio/src/runtime/blocking/pool.rs index 77ab4958683..bb6c1ee6606 100644 --- a/tokio/src/runtime/blocking/pool.rs +++ b/tokio/src/runtime/blocking/pool.rs @@ -244,7 +244,7 @@ impl Spawner { rt.blocking_spawner.inner.run(id); drop(shutdown_tx); }) - .unwrap() + .expect("OS can't spawn a new worker thread") } }