From 2cd1d74092226250e959b52e3271ccd358b54964 Mon Sep 17 00:00:00 2001 From: Oleg Nosov Date: Wed, 27 Nov 2019 21:25:21 +0300 Subject: [PATCH] rt: specify that runtime should have task scheduler (#1839) * Specify that runtime should have task scheduler * Even more detailed panic message for incorrect task spawn --- tokio/src/runtime/global.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/runtime/global.rs b/tokio/src/runtime/global.rs index d8b7ed9b936..557be914a5d 100644 --- a/tokio/src/runtime/global.rs +++ b/tokio/src/runtime/global.rs @@ -47,7 +47,7 @@ where // Explicit drop of `future` silences the warning that `future` is // not used when neither rt-* feature flags are enabled. drop(future); - panic!("must be called from the context of Tokio runtime"); + panic!("must be called from the context of Tokio runtime configured with either `basic_scheduler` or `threaded_scheduler`"); } }) }