Skip to main content

Module readiness

Module readiness 

Source
Expand description

Waiting for the daemon to appear or go away.

Both directions are the same shape: ask a cheap predicate whether the state has flipped yet, and keep asking until it has or the wait is over. The predicate is a socket probe, so this lives here rather than in main.rs - the timing is a decision worth testing, and the probe is the only part that needs a real socket.

Constants§

READY_TIMEOUT
How long to keep asking before giving up.

Functions§

poll_until
Poll done until it returns true or READY_TIMEOUT elapses, starting at 2ms and doubling to a 50ms ceiling. Returns whether it flipped in time.