An asynchronous do-while-like function for node.