pub struct DelayingExecutor<'a> {
pub inner: &'a dyn RoundExecutor,
pub delay: Duration,
}Expand description
Wraps a consortium_nix::cascade::RoundExecutor and sleeps for a
configurable duration inside dispatch. Critical for live demos:
without this, the deterministic sim resolves a round in microseconds
and the live renderer’s “spinning” frame (rendered at PlanComputed)
is invisible because EdgeCompleted fires before the human eye can
register it.
The sleep happens between PlanComputed (which marks targets
in_progress) and EdgeCompleted (which marks them has_closure), so
the spinning ⏵ glyph is visible for delay real wall-time, then
snaps to ✔ on the next frame.
Demo / visualization only. Putting this in production paths adds fake latency to real deploys.
Fields§
§inner: &'a dyn RoundExecutor§delay: DurationTrait Implementations§
Source§impl<'a> RoundExecutor for DelayingExecutor<'a>
impl<'a> RoundExecutor for DelayingExecutor<'a>
fn dispatch( &self, nodes: &[CascadeNode], edges: &[(NodeId, NodeId)], net: &NetworkProfile, ) -> HashMap<(NodeId, NodeId), Result<Duration, CascadeError>>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DelayingExecutor<'a>
impl<'a> !UnwindSafe for DelayingExecutor<'a>
impl<'a> Freeze for DelayingExecutor<'a>
impl<'a> Send for DelayingExecutor<'a>
impl<'a> Sync for DelayingExecutor<'a>
impl<'a> Unpin for DelayingExecutor<'a>
impl<'a> UnsafeUnpin for DelayingExecutor<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more