Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between System.Threading.Tasks.Dataflow and Microsoft.Tpl.Dataflow

Tags:

There are 2 different official TPL Dataflow nuget package. I am confused to choose which one i should to use.

As far as i understand System.Threading.Tasks.Dataflow version is tiny bit newer than other and it seems System.Threading.Tasks.Dataflow is targeted latest versions of .net.

Anyone can explain differences between of those ?

like image 581
Freshblood Avatar asked Sep 09 '16 13:09

Freshblood


People also ask

Why use TPL dataflow?

The Task Parallel Library (TPL) provides dataflow components to help increase the robustness of concurrency-enabled applications. These dataflow components are collectively referred to as the TPL Dataflow Library.

What is TPL system?

Third Party Liability (TPL) refers to the legal obligation of third parties (for example, certain individuals, entities, insurers, or programs) to pay part or all of the expenditures for medical assistance furnished under a Medicaid state plan.

What is BufferBlock?

In short, BufferBlock provides an unbounded or bounded buffer for storing instances of T. You can “post” instances of T to the block, which cause the data being posted to be stored in a first-in-first-out (FIFO) order by the block.

What is TransformBlock C#?

The TransformBlock<TInput,TOutput> object specifies a Func<T,TResult> object to perform work when the blocks receive data. The ActionBlock<TInput> object uses a lambda expression to print to the console the number of zero bytes that are read. C# Copy.


1 Answers

Microsoft.Tpl.Dataflow was first released as a component separate from the BCL as part of .net 4.5 - here is a blog post announcing the release

System.Threading.Tasks.Dataflow as a separate package was created as part of the dotnet core release. This archived release history on github shows the point where 4.5.24 of Microsoft.Tpl.Dataflow (the last version on nuget) became 4.5.25-beta-23019 of System.Threading.Tasks.Dataflow (the first version on nuget).

And this old release note explicitly announces the name change.

It appears that the initial version was only for DotNet5.0 (as it was known at the time) but they have since made it backwards compatible.

So, most likely, you want System.Threading.Tasks.Dataflow.

like image 135
Chris Simon Avatar answered Sep 23 '22 01:09

Chris Simon