fn pump_until(
conn: &Connection,
queue: &mut EventQueue<CaptureState>,
state: &mut CaptureState,
wake_rd: RawFd,
timeout: Option<Duration>,
done: impl Fn(&CaptureState) -> bool,
) -> Result<Pump, String>Expand description
Dispatch events until done(state) holds, waiting on the Wayland socket and
the wake pipe together so control messages interrupt any capture wait. The
predicate is re-checked after every dispatch, so a wait whose condition was
satisfied by already-queued events returns without ever blocking.