1 write to _boundingState
System.Threading.Tasks.Dataflow (1)
Blocks\BroadcastBlock.cs (1)
81
_boundingState
= new BoundingStateWithPostponedAndTask<T>(dataflowBlockOptions.BoundedCapacity);
40 references to _boundingState
System.Threading.Tasks.Dataflow (40)
Blocks\BroadcastBlock.cs (40)
142
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
144
_boundingState
.TaskForInputProcessing = null;
187
if (
_boundingState
== null
189
(
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count == 0 &&
_boundingState
.TaskForInputProcessing == null))
203
if (
_boundingState
!= null)
_boundingState
.CurrentCount += 1; // track this new item against our bound
209
Debug.Assert(
_boundingState
!= null &&
_boundingState
.PostponedMessages != null,
212
_boundingState
.PostponedMessages.Push(source, messageHeader);
230
if (
_boundingState
!= null)
235
Debug.Assert(
_boundingState
.CurrentCount - numItemsRemoved >= 0,
237
_boundingState
.CurrentCount -= numItemsRemoved;
250
Debug.Assert(
_boundingState
!= null, "Must be in bounded mode.");
253
_boundingState
.TaskForInputProcessing == null &&
254
_boundingState
.PostponedMessages.Count > 0 &&
255
_boundingState
.CountIsLessThanBound)
259
_boundingState
.TaskForInputProcessing =
267
this,
_boundingState
.TaskForInputProcessing, DataflowEtwProvider.TaskLaunchedReason.ProcessingInputMessages,
268
_boundingState
.PostponedMessages.Count);
272
Exception? exception = Common.StartTaskSafe(
_boundingState
.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
285
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
287
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
309
_boundingState
.TaskForInputProcessing = null;
331
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
333
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
344
if (!
_boundingState
.CountIsLessThanBound) return false;
345
if (!
_boundingState
.PostponedMessages.TryPop(out sourceAndMessage)) return false;
349
_boundingState
.CurrentCount++;
368
lock (IncomingLock)
_boundingState
.CurrentCount--;
380
(
_boundingState
== null ||
_boundingState
.TaskForInputProcessing == null))
386
if (
_boundingState
!= null &&
_boundingState
.PostponedMessages.Count > 0)
394
if (thisBroadcastBlock.
_boundingState
!= null)
398
thisBroadcastBlock.
_boundingState
.PostponedMessages,