The core driver re-armed itself via wake_by_ref() after every poll, an unconditional spin at scheduler speed per worker for the engine's lifetime. The provisioning-reconciler-demo supervisor + 3 node children burned ~750% CPU idle; now ~50% (demo churn), wakeup latency for work delivered to an idle worker bounded by the idle interval. - ExecutionBackend::core_idle_poll() (default Duration::ZERO = previous immediate re-arm) lets a backend opt its drivers into idle parking. - TokioConfig::core_idle_poll (default 500us) configures it for the Tokio backend; from_runtime adopts the default. - CoreDriver: busy tick (or zero interval) re-arms immediately; idle tick arms one backend timer and parks. Every poll still runs exactly one try_tick, so stepping-backend semantics are unchanged. The backend is held Weak and touched only on idle transitions; if the engine is gone the driver parks until the substrate cancels it. - Contract tests: a parked driver observes a late external (engine-invisible) send within the idle interval; the backend reports its configured interval. |
||
|---|---|---|
| .. | ||
| backend.rs | ||
| core_driver.rs | ||
| engine.rs | ||
| lib.rs | ||
| stepping.rs | ||
| time.rs | ||
| tokio.rs | ||