About 238,000 results
Open links in new tab
  1. c# - How and when to use ‘async’ and ‘await’ - Stack Overflow

    Jan 22, 2013 · From my understanding one of the main things that async and await do is to make code easy to write and read - but is using them equal to spawning background threads to …

  2. Understanding async / await in C# - Stack Overflow

    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 it can be used for parallelism. I've tried the following very basic program: …

  3. When correctly use Task.Run and when just async-await

    The normal way to implement a "core" async method is to use TaskCompletionSource<T> or one of its shorthand notations such as FromAsync. I have a blog post that goes into more detail …

  4. async await - How do you create an asynchronous method in C

    Apr 6, 2015 · You can use await Task.Yield (); in an asynchronous method to force the method to complete asynchronously. Insert it at beginning of your method and it will then return …

  5. c# - How to wait for async method to complete? - Stack Overflow

    The most important thing to know about async and await is that await doesn't wait for the associated call to complete. What await does is it returns the result of the operation …

  6. c# - Parallel foreach with asynchronous lambda - Stack Overflow

    Feb 28, 2013 · c# asynchronous async-await task-parallel-library parallel.foreach edited Sep 11, 2023 at 3:18 Theodor Zoulias 46.3k 8 112 156

  7. c# - An async/await example that causes a deadlock - Stack …

    I came across some best practices for asynchronous programming using c#'s async / await keywords (I'm new to c# 5.0). One of the advices given was the following: Stability: Know your …

  8. c# - Running multiple async tasks and waiting for them all to …

    I need to run multiple async tasks in a console application, and wait for them all to complete before further processing. There's many articles out there, but I seem to get more confused …

  9. c# - What is the difference between asynchronous programming …

    Aug 28, 2024 · The async and await keywords don't cause additional threads to be created. Async methods don't require multithreading because an async method doesn't run on its own …

  10. c# - How to 'await' raising an EventHandler event - Stack Overflow

    Sep 17, 2012 · The async modifier just tells the compiler to generate an async state machine to manage any await keywords it encounters within the method (more to manage the lines after …