blob: 3f2cc9825e87ca199dc8194bfa0df62841496fca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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<T, S>(task: T) -> (Notified<S>, JoinHandle<T::Output>)
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;
}
|