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
This commit is contained in:
Oleg Nosov
2019-11-27 10:25:21 -08:00
committed by Carl Lerche
parent 632ee507ba
commit 2cd1d74092
+1 -1
View File
@@ -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`");
}
})
}