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