Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Batch Processing with Async | Async Loops and Processing Collections
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Async and Await Practice

bookChallenge: Batch Processing with Async

Tâche

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 batchSize task 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

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain that in simpler terms?

What are the main benefits of this approach?

Are there any common mistakes to avoid with this?

close

bookChallenge: Batch Processing with Async

Glissez pour afficher le menu

Tâche

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 batchSize task 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

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 4
single

single

some-alt