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.

Correct way to delay the start of a Task

I want to schedule a task to start in x ms and be able to cancel it before it starts (…

c# .net task-parallel-library
What's the difference between returning void and returning a Task?

In looking at various C# Async CTP samples I see some async functions that return void, and others that return …

c# asynchronous task-parallel-library return-type async-ctp
Waiting for async/await inside a task

I have this construct in my main(), which creates var tasks = new List<Task>(); var t = Task.Factory.…

c# .net task-parallel-library task async-await
The current SynchronizationContext may not be used as a TaskScheduler

I am using Tasks to run long running server calls in my ViewModel and the results are marshalled back on …

c# multithreading nunit task-parallel-library resharper-6.0
Task parallel library replacement for BackgroundWorker?

Does the task parallel library have anything that would be considered a replacement or improvement over the BackgroundWorker class? I …

c# winforms backgroundworker task-parallel-library
How to cancel a CancellationToken

I start a task, that start other tasks and so forth. Given that tree, if any task fails the result …

c# task-parallel-library cancellationtokensource
Execute task in background in WPF application

Example private void Start(object sender, RoutedEventArgs e) { int progress = 0; for (;;) { System.Threading.Thread.Sleep(1); progress++; Logger.Info(progress); } } What …

c# wpf multithreading task-parallel-library tap
Is it possible to use Task<bool> in if conditions?

In Windows Phone 8 I have method public async Task<bool> authentication(). The return type of the function is …

c# windows-phone-8 task-parallel-library async-await c#-5.0