1 write to _boundingState
System.Threading.Tasks.Dataflow (1)
Blocks\BufferBlock.cs (1)
61
_boundingState
= new BoundingStateWithPostponedAndTask<T>(dataflowBlockOptions.BoundedCapacity);
42 references to _boundingState
System.Threading.Tasks.Dataflow (42)
Blocks\BufferBlock.cs (42)
112
if (
_boundingState
== null
114
(
_boundingState
.CountIsLessThanBound &&
_boundingState
.PostponedMessages.Count == 0 &&
_boundingState
.TaskForInputProcessing == null))
128
if (
_boundingState
!= null)
_boundingState
.CurrentCount++;
135
Debug.Assert(
_boundingState
!= null &&
_boundingState
.PostponedMessages != null,
138
_boundingState
.PostponedMessages.Push(source, messageHeader);
177
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
179
_boundingState
.TaskForInputProcessing = null;
231
if (
_boundingState
!= null)
236
Debug.Assert(
_boundingState
.CurrentCount - numItemsRemoved >= 0,
238
_boundingState
.CurrentCount -= numItemsRemoved;
251
Debug.Assert(
_boundingState
!= null, "Must be in bounded mode.");
254
_boundingState
.TaskForInputProcessing == null &&
255
_boundingState
.PostponedMessages.Count > 0 &&
256
_boundingState
.CountIsLessThanBound)
260
_boundingState
.TaskForInputProcessing =
268
this,
_boundingState
.TaskForInputProcessing, DataflowEtwProvider.TaskLaunchedReason.ProcessingInputMessages,
269
_boundingState
.PostponedMessages.Count);
273
Exception? exception = Common.StartTaskSafe(
_boundingState
.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
287
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
289
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
311
_boundingState
.TaskForInputProcessing = null;
333
Debug.Assert(
_boundingState
!= null &&
_boundingState
.TaskForInputProcessing != null,
335
Debug.Assert(
_boundingState
.TaskForInputProcessing.Id == Task.CurrentId,
347
if (!
_boundingState
.CountIsLessThanBound) return false;
348
if (!
_boundingState
.PostponedMessages.TryPop(out sourceAndMessage)) return false;
352
_boundingState
.CurrentCount++;
371
lock (IncomingLock)
_boundingState
.CurrentCount--;
383
(
_boundingState
== null ||
_boundingState
.TaskForInputProcessing == null))
389
if (
_boundingState
!= null &&
_boundingState
.PostponedMessages.Count > 0)
397
if (thisBufferBlock.
_boundingState
!= null)
401
thisBufferBlock.
_boundingState
.PostponedMessages,
456
get { return _bufferBlock.
_boundingState
?.PostponedMessages; }
462
public Task? TaskForInputProcessing { get { return _bufferBlock.
_boundingState
?.TaskForInputProcessing; } }