[][src]Function kwait::poll_immediate_until

pub fn poll_immediate_until<F>(
    interval: Duration,
    condition: F,
    stop_ch: Receiver<bool>
) -> Result<(), Box<dyn Error>> where
    F: Fn() -> Result<bool, Box<dyn Error>> + Copy

poll_immediate_until tries a condition func until it returns true, an error or stop_ch is closed.

poll_immediate_until runs the 'condition' before waiting for the interval. 'condition' will always be invoked at least once.