TPL Dataflow

suggest change

Versions

The examples target the TPL Dataflow NuGet package on .NET Framework 4.5 through 4.6.2.

Remarks

Libraries Used in Examples

System.Threading.Tasks.Dataflow

System.Threading.Tasks

System.Net.Http

System.Net

Difference between Post and SendAsync

To add items to a block you can either use Post or SendAsync.

Post tries to add the item synchronously and returns a bool that says whether it succeeded. It can fail when, for example, a block has reached its BoundedCapacity and has no room for another item. SendAsync returns a Task<bool> that you can await. That task completes with true when the block can accept the item, or with false if the block is declining permanently (for example, because it was canceled). These types ship in the TPL Dataflow NuGet package. They are not in the .NET Framework base class library.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents