Top "Async-await" questions

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

SyntaxError: Unexpected token function - Async Await Nodejs

I was experimenting on using Node version 6.2.1 with some of my code. Had plans to migrate most of the hyper-callback …

javascript node.js express asynchronous async-await
If my interface must return Task what is the best way to have a no-operation implementation?

In the code below, due to the interface, the class LazyBar must return a task from its method (and for …

c# .net task-parallel-library async-await threadpool
await vs Task.Wait - Deadlock?

I don't quite understand the difference between Task.Wait and await. I have something similar to the following functions in …

c# task-parallel-library deadlock async-await
How do you create an asynchronous method in C#?

Every blog post I've read tells you how to consume an asynchronous method in C#, but for some odd reason …

c# async-await c#-5.0
Using await outside of an async function

I was attempting to chain two async functions together, because the first had a conditional return parameter that caused the …

javascript node.js async-await
Async/Await Class Constructor

At the moment, I'm attempting to use async/await within a class constructor function. This is so that I can …

javascript node.js async-await
try/catch blocks with async/await

I'm digging into the node 7 async/await feature and keep stumbling across code like this This seems to be the …

node.js async-await ecmascript-2017
Call asynchronous method in constructor?

Summary: I would like to call an asynchronous method in a constructor. Is this possible? Details: I have a method …

c# windows-phone-8 constructor visual-studio-2013 async-await
Cannot implicitly convert type 'string' to 'System.Threading.Tasks.Task<string>'

I am new to asynchronous programming, so after going through some async sample codes, I thought of writing a simple …

c# task-parallel-library async-await
Use async await with Array.map

Given the following code: var arr = [1,2,3,4,5]; var results: number[] = await arr.map(async (item): Promise<number> => { await …

javascript typescript promise async-await ecmascript-2017