This is a solution to the situation where you have an asynchronous task you want to perform over and over again, in a non-blocking fashion, stopping when some condition is met.
To set the stage, I’ll be using the Bluebird Promise library, the best Promise library I’ve used.
First, we’ll construct the Promise function which will do the looping:...
Your new post is loading...