Top "Async-await" questions

This covers the asynchronous programming model supported by various programming languages, using the async and await keywords.

Return list from async/await method

I want to make a webservice request asynchron. I call it here: List<Item> list = GetListAsync(); Here is …

c# list asynchronous async-await task
WaitAll vs WhenAll

What is the difference between Task.WaitAll() and Task.WhenAll() from the Async CTP ? Can you provide some sample code …

c# asynchronous async-await task-parallel-library
await Task.Delay() vs. Task.Delay().Wait()

In C# I have the following two simple examples: [Test] public void TestWait() { var t = Task.Factory.StartNew(() => { Console.…

c# asynchronous task wait async-await
How can I use async/await at the top level?

I have been going over async/await and after going over several articles, I decided to test things myself. However, …

javascript node.js async-await ecmascript-2017
How to use await in a loop

I'm trying to create an asynchronous console app that does a some work on a collection. I have one version …

c# .net async-await
What is the difference between asynchronous programming and multithreading?

I thought that they were basically the same thing — writing programs that split tasks between processors (on machines that have 2+ …

c# multithreading asynchronous parallel-processing async-await
Getting return value from Task.Run

I have the following code: public static async Task<string> Start(IProgress<ProcessTaskAsyncExProgress> progress) { const int …

c# .net task-parallel-library async-await
Parallel.ForEach vs Task.Run and Task.WhenAll

What are the differences between using Parallel.ForEach or Task.Run() to start a set of tasks asynchronously? Version 1: List&…

c# async-await parallel.foreach
Async function without await in Javascript

I have two functions a and b that are asynchronous, the former without await and the later with await. They …

javascript asynchronous async-await
What's the difference between Task.Start/Wait and Async/Await?

I may be missing something but what is the difference between doing: public void MyMethod() { Task t = Task.Factory.StartNew(…

c# task-parallel-library .net-4.5 async-await conceptual