From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/tokio/src/runtime/tests/mod.rs | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vendor/tokio/src/runtime/tests/mod.rs (limited to 'vendor/tokio/src/runtime/tests/mod.rs') diff --git a/vendor/tokio/src/runtime/tests/mod.rs b/vendor/tokio/src/runtime/tests/mod.rs new file mode 100644 index 000000000..3f2cc9825 --- /dev/null +++ b/vendor/tokio/src/runtime/tests/mod.rs @@ -0,0 +1,40 @@ +#[cfg(not(all(tokio_unstable, feature = "tracing")))] +use crate::runtime::task::joinable; + +#[cfg(all(tokio_unstable, feature = "tracing"))] +use self::joinable_wrapper::joinable; + +#[cfg(all(tokio_unstable, feature = "tracing"))] +mod joinable_wrapper { + use crate::runtime::task::{JoinHandle, Notified, Schedule}; + use tracing::Instrument; + + pub(crate) fn joinable(task: T) -> (Notified, JoinHandle) + where + T: std::future::Future + Send + 'static, + S: Schedule, + { + let span = tracing::trace_span!("test_span"); + crate::runtime::task::joinable(task.instrument(span)) + } +} + +cfg_loom! { + mod loom_basic_scheduler; + mod loom_local; + mod loom_blocking; + mod loom_oneshot; + mod loom_pool; + mod loom_queue; + mod loom_shutdown_join; +} + +cfg_not_loom! { + mod queue; + + #[cfg(not(miri))] + mod task_combinations; + + #[cfg(miri)] + mod task; +} -- cgit v1.2.3