Challenge: Batch Processing with Async
Task
Swipe to start coding
Write an asynchronous method that processes a list of tasks in batches using Task.WhenAll. The method should execute up to batchSize tasks concurrently, waiting for all tasks in each batch to complete before starting the next batch.
- For each batch, select up to
batchSizetask functions from the input list. - Start and await all tasks in the batch using
Task.WhenAll. - Continue processing batches until all task functions in the list have been executed.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 4
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5.56
Challenge: Batch Processing with Async
Swipe to show menu
Task
Swipe to start coding
Write an asynchronous method that processes a list of tasks in batches using Task.WhenAll. The method should execute up to batchSize tasks concurrently, waiting for all tasks in each batch to complete before starting the next batch.
- For each batch, select up to
batchSizetask functions from the input list. - Start and await all tasks in the batch using
Task.WhenAll. - Continue processing batches until all task functions in the list have been executed.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 4
single