About 129,000 results
Open links in new tab
  1. Understanding async / await in C# - Stack Overflow

    18 Understand C# Task, async and await C# Task Task class is an asynchronous task wrapper. Thread.Sleep (1000) can stop a thread running for 1 second. While Task.Delay (1000) won't stop the …

  2. c# - What is the difference between task and thread? - Stack Overflow

    Nov 9, 2010 · In C# 4.0, we have Task in the System.Threading.Tasks namespace. What is the true difference between Thread and Task. I did some sample program (help taken from MSDN) for my …

  3. c# - When would I use Task.Yield ()? - Stack Overflow

    Nov 3, 2022 · I'm using async/await and Task a lot but have never been using Task.Yield() and to be honest even with all the explanations I do not understand why I would need this method. Can …

  4. 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 experiencing laggy UI in our WPF .NET 4.5 application (with Caliburn Micro framework). Basically I...

  5. How do I wait until Task is finished in C#? - Stack Overflow

    Nov 3, 2012 · How do I wait until Task is finished in C#? Asked 13 years, 2 months ago Modified 5 years, 2 months ago Viewed 208k times

  6. c# - _ = Task.Run vs async void - Stack Overflow

    May 21, 2020 · As for Task.Yield() vs Task.Run - perhaps a matter of choice, and it really won't matter unless you're doing it a hell of a lot. If this was IO library internals: I'd use Task.Yield() simply to …

  7. c# - Regarding usage of Task.Start () , Task.Run () and Task.Factory ...

    Apr 17, 2015 · Tell me, are Task.Start(), Task.Run() and Task.Factory.StartNew() all used for the same purpose or do they have different significance? When should one use Task.Start(), when should one …

  8. c# - Is Task.Result the same as .GetAwaiter.GetResult ()? - Stack Overflow

    352 Task.GetAwaiter().GetResult() is preferred over Task.Wait and Task.Result because it propagates exceptions rather than wrapping them in an AggregateException. However, all three methods cause …

  9. c# - async/await - when to return a Task vs void? - Stack Overflow

    Normally, you would want to return a Task. The main exception should be when you need to have a void return type (for events). If there's no reason to disallow having the caller await your task, why …

  10. c# - How to return a result from an async task? - Stack Overflow

    Oct 20, 2015 · I would like to return a string result from an async task. System.Threading.Tasks.Task.Run (async () => await audatex.UploadInvoice (assessment, …