About 125,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 …

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

    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 …

  3. c# - How do I get the result or return value of a Task? - Stack …

    Can someone explain to me how to return the result of a Task? I currently am trying to do the following but my Tasks are not returning my List that I expect? What is the problem here? …

  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). …

  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, 1 month ago Modified 5 years, 1 month ago Viewed 208k times

  6. Is Task.Result the same as .GetAwaiter.GetResult ()?

    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 …

  7. 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. …

  8. 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 …

  9. 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() …

  10. Asynchronously wait for Task<T> to complete with timeout

    I can use Task.ContinueWith to asynchronously wait for the task to complete (i.e. schedule an action to be executed when the task is complete), but that doesn't allow to specify a timeout. I …