Function single_executor::polling_future [−][src]
pub async fn polling_future<Q, CS>(
function: impl FnMut() -> bool,
sleep_duration: Duration,
sleep_future_runner: SleepFutureRunner<Q, CS>
) where
CS: TryThreadSpawner<()> + TimeFunctions,
Q: 'static + TimeoutQueue<Item = SleepMessage<CS>> + Send + Sync,
Expand description
Polls a function (function
) until it returns true. Sleeps between polls for sleep_duration
.