pub struct SimulatedExecutor { /* private fields */ }Expand description
Simulation-mode Executor — Phase 0 uses real tokio::spawn while
recording spawned-task counts for property checks.
The full single-threaded deterministic scheduler (per
pulse-architecture-v1.md §10.5) lands in a later phase when
cross-task interleaving needs to be controlled by the harness — that
scheduler is crate::SimScheduler.
This executor runs tasks on the multi-threaded tokio runtime and only
counts spawns; it does not by itself make a workload deterministic.
Time and Random are reproducible only under single-threaded drive
(see crate::SimScheduler); spawning shared clocks/RNGs across tokio
worker threads through this executor gives a run-to-run-varying interleaving.
For a replayable run, drive the workload on crate::SimScheduler.
Implementations§
Source§impl SimulatedExecutor
impl SimulatedExecutor
Sourcepub fn spawned_count(&self) -> u64
pub fn spawned_count(&self) -> u64
Total number of spawn calls observed.
Trait Implementations§
Source§impl Default for SimulatedExecutor
impl Default for SimulatedExecutor
Source§impl Executor for SimulatedExecutor
impl Executor for SimulatedExecutor
Source§type JoinHandle<O: Send + 'static> = JoinHandle<O>
type JoinHandle<O: Send + 'static> = JoinHandle<O>
JoinHandle; a deterministic SimScheduler-backed executor uses its own
scheduler-native handle. The abstraction has NO required surface — every
production spawn() call site discards the handle — so this GAT is pure
prep that keeps the existing executors byte-identical while unblocking a
non-tokio implementation.