Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ExecutionDataflowBlockOptions::SingleProducerConstrained Property

 

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)

public:
property bool SingleProducerConstrained {
	bool get();
	void set(bool value);
}

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.

Return to top
Show:
© 2017 Microsoft