1 #[cfg(not(all(tokio_unstable, feature = "tracing")))]
2 use crate::runtime::task::joinable;
3 
4 #[cfg(all(tokio_unstable, feature = "tracing"))]
5 use self::joinable_wrapper::joinable;
6 
7 #[cfg(all(tokio_unstable, feature = "tracing"))]
8 mod joinable_wrapper {
9     use crate::runtime::task::{JoinHandle, Notified, Schedule};
10     use tracing::Instrument;
11 
joinable<T, S>(task: T) -> (Notified<S>, JoinHandle<T::Output>) where T: std::future::Future + Send + 'static, S: Schedule,12     pub(crate) fn joinable<T, S>(task: T) -> (Notified<S>, JoinHandle<T::Output>)
13     where
14         T: std::future::Future + Send + 'static,
15         S: Schedule,
16     {
17         let span = tracing::trace_span!("test_span");
18         crate::runtime::task::joinable(task.instrument(span))
19     }
20 }
21 
22 cfg_loom! {
23     mod loom_basic_scheduler;
24     mod loom_blocking;
25     mod loom_oneshot;
26     mod loom_pool;
27     mod loom_queue;
28     mod loom_shutdown_join;
29 }
30 
31 cfg_not_loom! {
32     mod queue;
33 
34     #[cfg(miri)]
35     mod task;
36 }
37