Add support for looping in asynchronous calls.