aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/scheduler/multi_thread/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/scheduler/multi_thread/mod.rs')
-rw-r--r--src/runtime/scheduler/multi_thread/mod.rs31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/runtime/scheduler/multi_thread/mod.rs b/src/runtime/scheduler/multi_thread/mod.rs
index 47cd1f3..d85a0ae 100644
--- a/src/runtime/scheduler/multi_thread/mod.rs
+++ b/src/runtime/scheduler/multi_thread/mod.rs
@@ -1,18 +1,39 @@
//! Multi-threaded runtime
+mod counters;
+use counters::Counters;
+
mod handle;
pub(crate) use handle::Handle;
+mod overflow;
+pub(crate) use overflow::Overflow;
+
mod idle;
use self::idle::Idle;
+mod stats;
+pub(crate) use stats::Stats;
+
mod park;
pub(crate) use park::{Parker, Unparker};
pub(crate) mod queue;
mod worker;
-pub(crate) use worker::Launch;
+pub(crate) use worker::{Context, Launch, Shared};
+
+cfg_taskdump! {
+ mod trace;
+ use trace::TraceStatus;
+
+ pub(crate) use worker::Synced;
+}
+
+cfg_not_taskdump! {
+ mod trace_mock;
+ use trace_mock::TraceStatus;
+}
pub(crate) use worker::block_in_place;
@@ -62,11 +83,9 @@ impl MultiThread {
where
F: Future,
{
- let mut enter = crate::runtime::context::enter_runtime(handle, true);
- enter
- .blocking
- .block_on(future)
- .expect("failed to park thread")
+ crate::runtime::context::enter_runtime(handle, true, |blocking| {
+ blocking.block_on(future).expect("failed to park thread")
+ })
}
pub(crate) fn shutdown(&mut self, handle: &scheduler::Handle) {