Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Parallel Async Operations | Async/Await Fundamentals and Converting Sync to Async
C# Async and Await Practice

bookChallenge: Parallel Async Operations

Tarefa

Swipe to start coding

Write an asynchronous method that starts three API call simulations in parallel, waits for all of them to complete, and returns their results as an array.

  • Start three asynchronous operations by calling SimulateApiCallAsync with the following arguments: ("API 1", 1000), ("API 2", 1500), and ("API 3", 500).
  • Run all three operations in parallel, not sequentially.
  • Wait for all three operations to complete before proceeding.
  • Return an array of the results from all three operations.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Suggested prompts:

Can you explain that in simpler terms?

What are the main benefits of this?

Are there any common mistakes to avoid?

close

bookChallenge: Parallel Async Operations

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write an asynchronous method that starts three API call simulations in parallel, waits for all of them to complete, and returns their results as an array.

  • Start three asynchronous operations by calling SimulateApiCallAsync with the following arguments: ("API 1", 1000), ("API 2", 1500), and ("API 3", 500).
  • Run all three operations in parallel, not sequentially.
  • Wait for all three operations to complete before proceeding.
  • Return an array of the results from all three operations.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
single

single

some-alt