mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-22 00:00:11 +02:00
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:
@@ -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`");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user