What I would like to know is if there is a limit on how many customers can be in the collection. What if it is 100, 000. Will it just get queued up in the asynch queue?
There is no limit. However, each processing is started one at a time; that is, the Process
method (which I assume is asynchronous and should be called ProcessAsync
) will be called once for each item, returning a Task<T>
for each.
If you do want to (asynchronously) wait for all the tasks to complete, you can use Task.WhenAll
as such:
await Task.WhenAll(customers.Select(e => e.Process()));