Call check until it returns something truthy, waiting interval
milliseconds between attempts, and resolve with that value.
Rejects with a CancelError when signal aborts or timeout elapses,
whichever happens first. Either one ends the loop for good: no further
check runs, and the result of one already in flight is discarded.
A check in flight is still awaited before that rejection surfaces, so pass
signal on to whatever the attempt does if cancellation should be prompt.
Call
checkuntil it returns something truthy, waitingintervalmilliseconds between attempts, and resolve with that value.Rejects with a
CancelErrorwhensignalaborts ortimeoutelapses, whichever happens first. Either one ends the loop for good: no furthercheckruns, and the result of one already in flight is discarded.A
checkin flight is still awaited before that rejection surfaces, so passsignalon to whatever the attempt does if cancellation should be prompt.