Mountain/Binary/Initialize/RuntimeBuild/BuildDebug.rs
1
2//! Single-worker scheduler for debugging. Predictable execution order
3//! makes step-through and trace inspection tractable. Compile-time
4//! gated to the `Debug` feature.
5
6#[cfg(feature = "Debug")]
7use std::sync::Arc;
8
9#[cfg(feature = "Debug")]
10use Echo::Scheduler::Scheduler::Scheduler;
11
12#[cfg(feature = "Debug")]
13use crate::{
14 Binary::Initialize::RuntimeBuild::{BuildWithConfig, SchedulerConfig},
15 dev_log,
16};
17
18#[cfg(feature = "Debug")]
19pub fn Fn() -> Arc<Scheduler> {
20 dev_log!("lifecycle", "[RuntimeBuild] Creating debug scheduler (single-threaded)");
21
22 BuildWithConfig::Fn(SchedulerConfig::Struct { WorkerCount:Some(1), ..Default::default() })
23}