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.

Timeout for Action in Parallel.ForEach iteration

I have something similar to this in my code: Parallel.ForEach(myList, new ParallelOptions { MaxDegreeOfParallelism = 4 }, item => { Process(item); }); The …

c# task-parallel-library c#-5.0 parallel.foreach
TPL vs Reactive Framework

When would one choose to use Rx over TPL or are the 2 frameworks orthogonal? From what I understand Rx is …

c# .net task-parallel-library system.reactive
Is it true that for long running processes it is better to do thread manually instead of threadpool?

I read on the other day that for long-running tasks my best bet is to manually create threads instead of …

.net multithreading c#-4.0 threadpool task-parallel-library
Problems with references to TPL Dataflow and TPL in VS 2012 RC

I just upgraded Visual Studio 11 Beta to the new Visual Studio 2012 RC and have problems referencing TPL Dataflow. First, I …

.net task-parallel-library nuget visual-studio-2012 tpl-dataflow
Is there a generic Task.WaitAll?

I start a few parallel tasks, like this: var tasks = Enumerable.Range(1, 500) .Select(i => Task.Factory.StartNew<int&…

c# generics task-parallel-library covariance
Track progress when using TPL's Parallel.ForEach

What is the best way way to track progress in the following long total = Products.LongCount(); long current = 0; double Progress = 0.0; …

c# multithreading c#-4.0 task-parallel-library plinq
TPL Dataflow, whats the functional difference between Post() and SendAsync()?

I am confused about the difference between sending items through Post() or SendAsync(). My understanding is that in all cases …

c# concurrency task-parallel-library message-passing tpl-dataflow
Running a WPF control in another thread

I am using a visual control in my project that is from a library that I do not have the …

c# wpf multithreading task-parallel-library blocking
What do I do with async Tasks I don't want to wait for?

I am writing a multi player game server and am looking at ways the new C# async/await features can …

c# asynchronous task-parallel-library async-await synchronizationcontext
StaTaskScheduler and STA thread message pumping

TL;DR: A deadlock inside a task run by StaTaskScheduler. Long version: I'm using StaTaskScheduler from ParallelExtensionsExtras by Parallel Team, …

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