Limit number of parallel calls to an asynchronous function.