1// Some combinations of features may not use these constants.
2#![cfg_attr(not(feature = "full"), allow(dead_code))]
3
4/// Error string explaining that the Tokio context hasn't been instantiated.
5pub(crate) const CONTEXT_MISSING_ERROR: &str =
6 "there is no reactor running, must be called from the context of a Tokio 1.x runtime";
7
8/// Error string explaining that the Tokio context is shutting down and cannot drive timers.
9pub(crate) const RUNTIME_SHUTTING_DOWN_ERROR: &str =
10 "A Tokio 1.x context was found, but it is being shutdown.";
11
12/// Error string explaining that the Tokio context is not available because the
13/// thread-local storing it has been destroyed. This usually only happens during
14/// destructors of other thread-locals.
15pub(crate) const THREAD_LOCAL_DESTROYED_ERROR: &str =
16 "The Tokio context thread-local variable has been destroyed.";
17