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

bookChallenge: Parallel Async Operations

Opgave

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.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 6
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Parallel Async Operations

Stryg for at vise menuen

Opgave

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.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 6
single

single

some-alt