Top "Async-await" questions

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

How and when to use ‘async’ and ‘await’

From my understanding one of the main things that async and await do is to make code easy to write …

c# .net asynchronous async-await
How can I wait In Node.js (JavaScript)? l need to pause for a period of time

I'm developing a console script for personal needs. I need to be able to pause for an extended amount of …

javascript node.js async-await yield
How to call asynchronous method from synchronous method in C#?

I have a public async void Foo() method that I want to call from synchronous method. So far all I …

c# async-await
Using async/await with a forEach loop

Are there any issues with using async/await in a forEach loop? I'm trying to loop through an array of …

javascript node.js promise async-await ecmascript-2017
How would I run an async Task<T> method synchronously?

I'm learning about async/await, and ran into a situation where I need to call an async method synchronously. How …

c# asynchronous c#-5.0 async-await
Do you have to put Task.Run in a method to make it async?

I'm trying to understand async await in the simplest form. I want to create a very simple method that adds …

c# .net-4.5 async-await c#-5.0
How to wait for async method to complete?

I'm writing a WinForms application that transfers data to a USB HID class device. My application uses the excellent Generic …

c# asynchronous async-await
Combination of async function + await + setTimeout

I am trying to use the new async features and I hope solving my problem will help others in the …

javascript async-await settimeout ecmascript-2017
When correctly use Task.Run and when just async-await

I would like to ask you on your opinion about the correct architecture when to use Task.Run. I am …

c# asynchronous task async-await
Syntax for async arrow function

I can mark a javascript function as "async" (i.e. returning a promise) with the async keyword. Like this: async …

javascript promise async-await arrow-functions