Skip to content

Commit 50bdcbf

Browse files
svickRon Petrusha
authored andcommitted
Added documentation for DataflowBlockOptions.EnsureOrdered (#2374)
* Added documentation for DataflowBlockOptions.EnsureOrdered * Apply suggestions from code review Co-Authored-By: svick <[email protected]>
1 parent 86fce5f commit 50bdcbf

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

xml/System.Threading.Tasks.Dataflow/DataflowBlockOptions.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,23 @@
143143
<ReturnType>System.Boolean</ReturnType>
144144
</ReturnValue>
145145
<Docs>
146-
<summary>To be added.</summary>
147-
<value>To be added.</value>
148-
<remarks>To be added.</remarks>
146+
<summary>Gets or sets whether ordered processing should be enforced on a block's handling of messages.</summary>
147+
<remarks>
148+
<format type="text/markdown"><![CDATA[
149+
150+
## Remarks
151+
152+
By default, dataflow blocks enforce ordering on the processing of messages. This means that a
153+
block like <xref:System.Threading.Tasks.Dataflow.TransformBlock%602?displayProperty=nameWithType> will ensure that messages are output in the same
154+
order they were input, even if parallelism is employed by the block, and the processing of a message N finishes
155+
after the processing of a subsequent message N+1 (the block will reorder the results to maintain the input
156+
ordering prior to making those results available to a consumer). Some blocks may allow this to be relaxed,
157+
however. Setting <xref:System.Threading.Tasks.Dataflow.DataflowBlockOptions.EnsureOrdered> to false tells a block that it may relax this ordering if
158+
it's able to do so. This can be beneficial if making a processed result immediately available
159+
is more important than maintaining the input-to-output ordering.
160+
161+
]]></format>
162+
</remarks>
149163
</Docs>
150164
</Member>
151165
<Member MemberName="MaxMessagesPerTask">
@@ -260,4 +274,4 @@
260274
</Docs>
261275
</Member>
262276
</Members>
263-
</Type>
277+
</Type>

0 commit comments

Comments
 (0)