Top "Async-await" questions

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

How to get awaitable Thread.Sleep?

I'm writing a network-bound application based on await/sleep paradigm. Sometimes, connection errors happen, and in my experience it pays …

c# .net multithreading async-await
Run "async" method on a background thread

I'm trying to run an "async" method from an ordinary method: public string Prop { get { return _prop; } set { _prop = value; …

c# windows-phone windows-phone-7.1 async-await
How can I run both of these methods 'at the same time' in .NET 4.5?

I have a method which does 2 independent pieces of logic. I was hoping I can run them both at the …

c# .net task async-await multitasking
How to Async Files.ReadAllLines and await for results?

I have the following code, private void button1_Click(object sender, RoutedEventArgs e) { button1.IsEnabled = false; var s = File.ReadAllLines("…

c# .net asynchronous async-await c#-5.0
What is the advantage of using async with MVC5?

What is the difference between: public ActionResult Login(LoginViewModel model, string returnUrl) { if (ModelState.IsValid) { IdentityResult result = IdentityManager.Authentication.CheckPasswordAndSignIn(…

asp.net-mvc task-parallel-library async-await asp.net-mvc-5 asp.net-identity
Converting a WebClient method to async / await

I have some existing code which I am porting to Windows 8 WinRT. The code fetches data from URL, asynchronously invoking …

c# microsoft-metro async-await
What does the suspend function mean in a Kotlin Coroutine?

I'm reading Kotlin Coroutine and know that it is based on suspend function. But what does suspend mean? Coroutine or …

kotlin async-await suspend kotlin-coroutines
How to limit the amount of concurrent async I/O operations?

// let's say there is a list of 1000+ URLs string[] urls = { "http://google.com", "http://yahoo.com", ... }; // now let's send HTTP …

c# asynchronous task-parallel-library async-ctp async-await
How to write an "awaitable" method?

I'm finally looking into the async & await keywords, which I kind of "get", but all the examples I've seen …

c# async-await
Understanding async / await in C#

I'm starting to learn about async / await in C# 5.0, and I don't understand it at all. I don't understand how …

c# async-await