Hi guys,

I'm pretty sure there is an elegant way to do this in vibe so maybe somebody can point me in the right direction. We interact with an external API which takes about 10 seconds per request. About once a day we need to request updates for records that are pending. One request per record and we are looking at 200-400 records. While the response is slow, we have been advised by our vendor that it has no issues with concurrent processing as they have a large farm and the API will will take up to 10 concurrent requests per user and we are being encouraged to utilise this.

So I want to take an array of ids numbering 200+ and and then do concurrent requests to the API with a fixed limit. Say no more than 5 requests running at a time. As each request finishes, grab the next id from the queue until there are none left. Although I can see that I can create a bunch of tasks and then wait for them with join, I can't find an elegant way to do the limiting.

Any help please?

David.