Export (0) Print
Expand All

ExecutionDataflowBlockOptions.SingleProducerConstrained Property

.NET Framework 4.5

Gets whether code using the dataflow block is constrained to one producer at a time.

Namespace:  System.Threading.Tasks.Dataflow
Assembly:  System.Threading.Tasks.Dataflow (in System.Threading.Tasks.Dataflow.dll)

'Declaration
Public Property SingleProducerConstrained As Boolean

Property Value

Type: System.Boolean
Returns Boolean.

This property defaults to false, such that the block may be used by multiple producers concurrently. This property should only be set to true if the code using the block can guarantee that it will only ever be used by one producer (e.g. a source linked to the block) at a time, meaning that methods like Post, Complete, Fault, and OfferMessage will never be called concurrently. Some blocks may choose to capitalize on the knowledge that there will only be one producer at a time in order to provide better performance.

Portable Class Library

Supported in: Portable Class Library

Show:
© 2014 Microsoft