Skip to main content

wait_to_publish

Function wait_to_publish 

Source
async fn wait_to_publish(
    changes: &mut Receiver<FleetSnapshot>,
    sent: &FleetSnapshot,
    sent_at: Instant,
    token: &CancellationToken,
    timing: &Timing,
) -> bool
Expand description

After a change of the snapshot, wait until it is time to publish: a change of the agents, kinds or channel count once those have settled (settle); a change of agent states or lines alone once STATE_MIN_INTERVAL has passed since sent_at. A structural change during that wait switches to settling. false on shutdown.