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)
322
if (!_dataflowBlockOptions.
Greedy
|| boundingEnabled) _nonGreedyState = new NonGreedyState(batchSize);
373
if (_dataflowBlockOptions.
Greedy
&&
415
if (!_dataflowBlockOptions.
Greedy
) ProcessAsyncIfNecessary();
595
if (_dataflowBlockOptions.
Greedy
)
684
if (!_dataflowBlockOptions.
Greedy
) RetrievePostponedItemsNonGreedy(allowFewerThanBatchSize: triggered);
755
Debug.Assert(!_dataflowBlockOptions.
Greedy
, "This method may only be used in non-greedy mode.");
872
Debug.Assert(_dataflowBlockOptions.
Greedy
, "This method may only be used in greedy mode.");
981
Debug.Assert(!_dataflowBlockOptions.
Greedy
, "This method may only be used in non-greedy mode.");
1031
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));
307
if (!dataflowBlockOptions.
Greedy
||
Blocks\JoinBlock.cs (16)
519
if (!dbo.
Greedy
|| dbo.BoundedCapacity > 0) _nonGreedy = new NonGreedyState();
520
if (dbo.
Greedy
) _messages = new Queue<T>();
528
if (_sharedResources._dataflowBlockOptions.
Greedy
)
559
if (_sharedResources._dataflowBlockOptions.
Greedy
)
587
return !_sharedResources._dataflowBlockOptions.
Greedy
? _nonGreedy!.PostponedMessages.Count : _messages!.Count;
596
Debug.Assert(_sharedResources._dataflowBlockOptions.
Greedy
, "This is only valid in greedy mode");
613
Debug.Assert(!_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in non-greedy mode");
653
Debug.Assert(!_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in non-greedy mode");
695
Debug.Assert(_sharedResources._dataflowBlockOptions.
Greedy
, "This is only used in greedy mode");
741
int messageCount = _sharedResources._dataflowBlockOptions.
Greedy
?
847
if (_sharedResources._dataflowBlockOptions.
Greedy
&&
897
bool greedy = _sharedResources._dataflowBlockOptions.
Greedy
;
1148
if (_dataflowBlockOptions.
Greedy
&& targetCanConsumePostponedMessages && (boundingCapacityAvailable || !target.HasTheHighestNumberOfMessagesAvailable)) return true;
1358
Debug.Assert(!_dataflowBlockOptions.
Greedy
|| _boundingState != null, "This only makes sense in non-greedy or bounding mode");
1370
madeProgress = !_dataflowBlockOptions.
Greedy
?
1385
if (!_dataflowBlockOptions.
Greedy
&& _boundingState != null) _boundingState.CurrentCount += 1;