Skip to main content

Mountain/Binary/Initialize/RuntimeBuild/
BuildDebug.rs

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