Repeatedly invokes a callback function at a specified interval until one of two conditions is met:
The callback function explicitly returns true, indicating the interval should be cleared.
The provided promise has resolved or rejected.
This is useful for performing a recurring action (e.g., logging or polling) that can end either due to
external completion logic or once all promises are settled.
Repeatedly invokes a callback function at a specified interval until one of two conditions is met:
true, indicating the interval should be cleared.