Top "Async-await" questions

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

Wrapping synchronous code into asynchronous call

I have a method in ASP.NET application, that consumes quite a lot of time to complete. A call to …

c# asp.net asynchronous async-await c#-5.0
'await' works, but calling task.Result hangs/deadlocks

I have the following four tests and the last one hangs when I run it. Why does this happen: [Test] …

c# nunit task deadlock async-await
call async method without await #2

I have an async method: public async Task<bool> ValidateRequestAsync(string userName, string password) { using (HttpClient client = new …

c# asp.net asynchronous async-await c#-5.0
async constructor functions in TypeScript?

I have some setup I want during a constructor, but it seems that is not allowed Which means I can't …

constructor typescript async-await
Using "await" inside non-async function

I have an async function that runs by a setInterval somewhere in my code. This function updates some cache in …

javascript asynchronous async-await
Flutter, render widget after async call

I would like to render a widget that needs an HTTP call to gather some data. Got the following code (…

async-await dart flutter
Python [Invalid syntax] with async def

I am trying write discord bots using Python, I have come across and threw together this bot. import discord import …

python syntax async-await discord discord.py
Is it possible to "await yield return DoSomethingAsync()"

Are regular iterator blocks (i.e. "yield return") incompatible with "async" and "await"? This gives a good idea of what …

c# async-await c#-5.0 iasyncenumerable
How to 'await' raising an EventHandler event

Sometimes the event pattern is used to raise events in MVVM applications by or a child viewmodel to send a …

c# events mvvm .net-4.5 async-await
ts An async function or method in ES5/ES3 requires the 'Promise' constructor

Hello I'm Using async/await in my TypeScript Project, But I Get this log: [ts] An async function or method …

typescript async-await