Top "Task-parallel-library" questions

The Task Parallel Library is part of the .NET Framework since .NET 4. It is a set of APIs to enable developers to program asynchronous applications.

Is prevTask.Wait() recommended to be used with ContinueWith (from the Tasks library)?

So I was told recently that how I was using my .ContinueWith for Tasks was not the proper way to …

c# task-parallel-library
When should TaskCompletionSource<T> be used?

AFAIK, all it knows is that at some point, its SetResult or SetException method is being called to complete the …

c# .net .net-4.0 task-parallel-library taskcompletionsource
Getting return value from Task.Run

I have the following code: public static async Task<string> Start(IProgress<ProcessTaskAsyncExProgress> progress) { const int …

c# .net task-parallel-library async-await
What's the difference between Task.Start/Wait and Async/Await?

I may be missing something but what is the difference between doing: public void MyMethod() { Task t = Task.Factory.StartNew(…

c# task-parallel-library .net-4.5 async-await conceptual
Async/await vs BackgroundWorker

In the past few days I have tested the new features of .net 4.5 and c# 5. I like its new async/…

c# task-parallel-library backgroundworker .net-4.5 async-await
What is the use for Task.FromResult<TResult> in C#

In C# and TPL (Task Parallel Library), the Task class represents an ongoing work that produces a value of type …

c# .net task-parallel-library task async-await
Create a completed Task

I want to create a completed Task (not Task<T>). Is there something built into .NET to do …

c# .net async-await task-parallel-library
What is the best way to catch exception in Task?

With System.Threading.Tasks.Task<TResult>, I have to manage the exceptions that could be thrown. I'm looking …

c# .net task-parallel-library
Using async without await in C#?

Consider Using async without await. think that maybe you misunderstand what async does. The warning is exactly right: if you …

c# task-parallel-library async-await c#-5.0
Why should I prefer single 'await Task.WhenAll' over multiple awaits?

In case I do not care about the order of task completion and just need them all to complete, should …

c# .net parallel-processing task-parallel-library async-await