1 write to _boundingState
System.Threading.Tasks.Dataflow (1)
Blocks\BufferBlock.cs (1)
58
_boundingState
= new BoundingStateWithPostponedAndTask<T>(dataflowBlockOptions.BoundedCapacity);
42 references to _boundingState
System.Threading.Tasks.Dataflow (42)
Blocks\BufferBlock.cs (42)
109
if (
_boundingState
== null
111
(
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count == 0 &&
_boundingState
.TaskForInputProcessing == null))
125
if (
_boundingState
!= null)
_boundingState
.CurrentCount++;
132
Debug.Assert(
_boundingState
!= null &&
_boundingState
.PostponedMessages != null,
135
_boundingState
.PostponedMessages.Push(source, messageHeader);
171
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
173
_boundingState
.TaskForInputProcessing = null;
225
if (
_boundingState
!= null)
230
Debug.Assert(
_boundingState
.CurrentCount - numItemsRemoved >= 0,
232
_boundingState
.CurrentCount -= numItemsRemoved;
245
Debug.Assert(
_boundingState
!= null, "Must be in bounded mode.");
248
_boundingState
.TaskForInputProcessing == null &&
249
_boundingState
.PostponedMessages.Count > 0 &&
250
_boundingState
.CountIsLessThanBound)
254
_boundingState
.TaskForInputProcessing =
262
this,
_boundingState
.TaskForInputProcessing, DataflowEtwProvider.TaskLaunchedReason.ProcessingInputMessages,
263
_boundingState
.PostponedMessages.Count);
267
Exception? exception = Common.StartTaskSafe(
_boundingState
.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
281
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
283
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
305
_boundingState
.TaskForInputProcessing = null;
327
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
329
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
341
if (!
_boundingState
.CountIsLessThanBound) return false;
342
if (!
_boundingState
.PostponedMessages.TryPop(out sourceAndMessage)) return false;
346
_boundingState
.CurrentCount++;
365
lock (IncomingLock)
_boundingState
.CurrentCount--;
377
(
_boundingState
== null ||
_boundingState
.TaskForInputProcessing == null))
383
if (
_boundingState
!= null &&
_boundingState
.PostponedMessages.Count > 0)
391
if (thisBufferBlock.
_boundingState
!= null)
395
thisBufferBlock.
_boundingState
.PostponedMessages,
450
get { return _bufferBlock.
_boundingState
?.PostponedMessages; }
456
public Task? TaskForInputProcessing { get { return _bufferBlock.
_boundingState
?.TaskForInputProcessing; } }