1 write to _boundingState
System.Threading.Tasks.Dataflow (1)
Blocks\BroadcastBlock.cs (1)
78
_boundingState
= new BoundingStateWithPostponedAndTask<T>(dataflowBlockOptions.BoundedCapacity);
40 references to _boundingState
System.Threading.Tasks.Dataflow (40)
Blocks\BroadcastBlock.cs (40)
136
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
138
_boundingState
.TaskForInputProcessing = null;
181
if (
_boundingState
== null
183
(
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count == 0 &&
_boundingState
.TaskForInputProcessing == null))
197
if (
_boundingState
!= null)
_boundingState
.CurrentCount += 1; // track this new item against our bound
203
Debug.Assert(
_boundingState
!= null &&
_boundingState
.PostponedMessages != null,
206
_boundingState
.PostponedMessages.Push(source, messageHeader);
224
if (
_boundingState
!= null)
229
Debug.Assert(
_boundingState
.CurrentCount - numItemsRemoved >= 0,
231
_boundingState
.CurrentCount -= numItemsRemoved;
244
Debug.Assert(
_boundingState
!= null, "Must be in bounded mode.");
247
_boundingState
.TaskForInputProcessing == null &&
248
_boundingState
.PostponedMessages.Count > 0 &&
249
_boundingState
.CountIsLessThanBound)
253
_boundingState
.TaskForInputProcessing =
261
this,
_boundingState
.TaskForInputProcessing, DataflowEtwProvider.TaskLaunchedReason.ProcessingInputMessages,
262
_boundingState
.PostponedMessages.Count);
266
Exception? exception = Common.StartTaskSafe(
_boundingState
.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
279
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
281
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
303
_boundingState
.TaskForInputProcessing = null;
325
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
327
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
338
if (!
_boundingState
.CountIsLessThanBound) return false;
339
if (!
_boundingState
.PostponedMessages.TryPop(out sourceAndMessage)) return false;
343
_boundingState
.CurrentCount++;
362
lock (IncomingLock)
_boundingState
.CurrentCount--;
374
(
_boundingState
== null ||
_boundingState
.TaskForInputProcessing == null))
380
if (
_boundingState
!= null &&
_boundingState
.PostponedMessages.Count > 0)
388
if (thisBroadcastBlock.
_boundingState
!= null)
392
thisBroadcastBlock.
_boundingState
.PostponedMessages,