1 write to _boundingState
System.Threading.Tasks.Dataflow (1)
Internal\TargetCore.cs (1)
130
_boundingState
= new BoundingStateWithPostponed<TInput>(_dataflowBlockOptions.BoundedCapacity);
36 references to _boundingState
System.Threading.Tasks.Dataflow (36)
Internal\TargetCore.cs (36)
202
if (
_boundingState
== null ||
203
(
_boundingState
.OutstandingTransfers == 0 &&
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count == 0))
219
if (
_boundingState
!= null)
_boundingState
.CurrentCount += 1; // track this new item against our bound
227
Debug.Assert(
_boundingState
!= null &&
_boundingState
.PostponedMessages != null,
231
_boundingState
.PostponedMessages.Push(source, messageHeader);
263
if (
_boundingState
!= null && boundingCountChange != 0)
265
Debug.Assert(boundingCountChange <= 0 &&
_boundingState
.CurrentCount + boundingCountChange >= 0,
267
_boundingState
.CurrentCount += boundingCountChange;
360
(!_decliningPermanently &&
_boundingState
!= null &&
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count > 0);
380
_messages.Count + (
_boundingState
!= null ?
_boundingState
.PostponedMessages.Count : 0));
404
bool shouldAttemptPostponedTransfer =
_boundingState
!= null &&
_boundingState
.BoundedCapacity > 1;
425
_boundingState
!.OutstandingTransfers > 0
426
&&
_boundingState
.OutstandingTransfers <= _dataflowBlockOptions.ActualMaxDegreeOfParallelism,
428
_boundingState
.OutstandingTransfers--; // was incremented in TryConsumePostponedMessage
589
else if (
_boundingState
!= null && TryConsumePostponedMessage(forPostponementTransfer: false, result: out messageWithId))
651
if (!
_boundingState
!.CountIsLessThanBound || !
_boundingState
.PostponedMessages.TryPop(out element))
661
_boundingState
.CurrentCount += 1; // optimistically take bounding space
664
Debug.Assert(
_boundingState
.OutstandingTransfers >= 0, "Expected TryConsumePostponedMessage to not be negative.");
665
_boundingState
.OutstandingTransfers++; // temporarily force postponement until we've successfully consumed the element
691
_boundingState
!.OutstandingTransfers--;
762
if (
_boundingState
!= null)
765
Common.ReleaseAllPostponedMessages(_owningTarget,
_boundingState
.PostponedMessages, ref _exceptions);
805
internal bool IsBounded { get { return
_boundingState
!= null; } }
813
if (
_boundingState
!= null)
817
Debug.Assert(count > 0 || (count < 0 &&
_boundingState
.CurrentCount + count >= 0),
819
_boundingState
.CurrentCount += count;
861
get { return _target.
_boundingState
?.PostponedMessages; }