1 write to Greedy
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlockOptions.cs (1)
404
Greedy
= this.Greedy,
28 references to Greedy
System.Threading.Tasks.Dataflow (28)
Base\DataflowBlockOptions.cs (1)
404
Greedy = this.
Greedy
,
Blocks\BatchBlock.cs (9)
319
if (!_dataflowBlockOptions.
Greedy
|| boundingEnabled) _nonGreedyState = new NonGreedyState(batchSize);
370
if (_dataflowBlockOptions.
Greedy
&&
412
if (!_dataflowBlockOptions.
Greedy
) ProcessAsyncIfNecessary();
592
if (_dataflowBlockOptions.
Greedy
)
681
if (!_dataflowBlockOptions.
Greedy
) RetrievePostponedItemsNonGreedy(allowFewerThanBatchSize: triggered);
752
Debug.Assert(!_dataflowBlockOptions.
Greedy
, "This method may only be used in non-greedy mode.");
869
Debug.Assert(_dataflowBlockOptions.
Greedy
, "This method may only be used in greedy mode.");
978
Debug.Assert(!_dataflowBlockOptions.
Greedy
, "This method may only be used in non-greedy mode.");
1028
Debug.Assert(_dataflowBlockOptions.
Greedy
, "This method may only be used in greedy mode.");
Blocks\BatchedJoinBlock.cs (2)
59
if (!dataflowBlockOptions.
Greedy
) throw new ArgumentException(SR.Argument_NonGreedyNotSupported, nameof(dataflowBlockOptions));
304
if (!dataflowBlockOptions.
Greedy
||
Blocks\JoinBlock.cs (16)
507
if (!dbo.
Greedy
|| dbo.BoundedCapacity > 0) _nonGreedy = new NonGreedyState();
508
if (dbo.
Greedy
) _messages = new Queue<T>();
516
if (_sharedResources._dataflowBlockOptions.
Greedy
)
547
if (_sharedResources._dataflowBlockOptions.
Greedy
)
575
return !_sharedResources._dataflowBlockOptions.
Greedy
? _nonGreedy!.PostponedMessages.Count : _messages!.Count;
584
Debug.Assert(_sharedResources._dataflowBlockOptions.
Greedy
, "This is only valid in greedy mode");
601
Debug.Assert(!_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in non-greedy mode");
641
Debug.Assert(!_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in non-greedy mode");
683
Debug.Assert(_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in greedy mode");
729
int messageCount = _sharedResources._dataflowBlockOptions.
Greedy
?
835
if (_sharedResources._dataflowBlockOptions.
Greedy
&&
885
bool greedy = _sharedResources._dataflowBlockOptions.
Greedy
;
1133
if (_dataflowBlockOptions.
Greedy
&& targetCanConsumePostponedMessages && (boundingCapacityAvailable || !target.HasTheHighestNumberOfMessagesAvailable)) return true;
1343
Debug.Assert(!_dataflowBlockOptions.
Greedy
|| _boundingState != null, "This only makes sense in non-greedy or bounding mode");
1355
madeProgress = !_dataflowBlockOptions.
Greedy
?
1370
if (!_dataflowBlockOptions.
Greedy
&& _boundingState != null) _boundingState.CurrentCount += 1;