311 references to Common
System.Threading.Tasks.Dataflow (311)
Base\DataflowBlock.cs (58)
212
return $"{
Common
.GetNameForDebugger(this)} Source = \"{(displaySource != null ? displaySource.Content : _source)}\", Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\"";
262
return target.OfferMessage(
Common
.SingleMessageHeader, item, source: null, consumeToAccept: false) == DataflowMessageStatus.Accepted;
316
return
Common
.CreateTaskFromCancellation<bool>(cancellationToken);
324
switch (target.OfferMessage(
Common
.SingleMessageHeader, item, source: null, consumeToAccept: false))
328
return
Common
.CompletedTaskWithTrueResult;
332
return
Common
.CompletedTaskWithFalseResult;
354
Common
.StoreDataflowMessageValueIntoExceptionData(exc, item);
355
return
Common
.CreateTaskFromException<bool>(exc);
537
CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
551
CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
564
SendAsyncSource<TOutput>? source =
Common
.UnwrapWeakReference<SendAsyncSource<TOutput>>(state!);
594
Common
.SingleMessageHeader, _messageValue, this, consumeToAccept: consumeToAccept))
636
Common
.StoreDataflowMessageValueIntoExceptionData(exc, _messageValue);
658
bool validMessage = (messageHeader.Id ==
Common
.SINGLE_MESSAGE_ID);
697
bool reservable = (messageHeader.Id ==
Common
.SINGLE_MESSAGE_ID);
711
if (messageHeader.Id !=
Common
.SINGLE_MESSAGE_ID)
748
return $"{
Common
.GetNameForDebugger(this)} Message = {_messageValue}, Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\"";
815
return ReceiveAsync(source,
Common
.InfiniteTimeSpan, CancellationToken.None);
832
return ReceiveAsync(source,
Common
.InfiniteTimeSpan, cancellationToken);
878
if (!
Common
.IsValidTimeout(timeout)) throw new ArgumentOutOfRangeException(nameof(timeout), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
896
return Receive(source,
Common
.InfiniteTimeSpan, CancellationToken.None);
914
return Receive(source,
Common
.InfiniteTimeSpan, cancellationToken);
963
if (!
Common
.IsValidTimeout(timeout)) throw new ArgumentOutOfRangeException(nameof(timeout), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
1012
return
Common
.CreateTaskFromCancellation<TOutput>(cancellationToken);
1031
return
Common
.CreateTaskFromException<TOutput>(exc);
1039
return
Common
.CreateTaskFromException<TOutput>(ReceiveTarget<TOutput>.CreateExceptionForTimeout());
1213
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageValue);
1260
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1370
return
Common
.InitializeStackTrace(new InvalidOperationException(SR.InvalidOperation_DataNotAvailableForReceive));
1377
return
Common
.InitializeStackTrace(new TimeoutException());
1393
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
1439
cancellationToken.IsCancellationRequested ?
Common
.CreateTaskFromCancellation<bool>(cancellationToken) :
1521
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
1651
return $"{
Common
.GetNameForDebugger(this)} Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\", Source = \"{(displaySource != null ? displaySource.Content : _source)}\"";
1914
return
Common
.CreateTaskFromCancellation<int>(dataflowBlockOptions.CancellationToken);
1931
return
Common
.CreateTaskFromException<int>(exc);
1970
CancellationToken.None,
Common
.GetCreationOptionsForTask(), scheduler);
2034
Common
.AddException(ref exceptions, task.Exception!, unwrapInnerExceptions: true);
2067
}, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
2088
return
Common
.CreateTaskFromCancellation<int>(cts.Token);
2102
return
Common
.CreateTaskFromException<int>(exc);
2136
}, CancellationToken.None,
Common
.GetContinuationOptions(), scheduler);
2171
Common
.WireCancellationToComplete(cancellationToken, base.Task,
2219
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
2293
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(_source);
2309
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: false);
2311
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(_source);
2359
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: false);
2389
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: true);
2472
Common
.GetContinuationOptions(TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously),
2477
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(Observable._source);
2485
Common
.GetContinuationOptions(TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.ExecuteSynchronously),
2487
}, this, Canceler.Token,
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
2494
Common
.ContractAssertMonitorStatus(Observable._SubscriptionLock, held: false);
2540
return
Common
.CreateTaskFromException<VoidResult>(exc);
2545
return
Common
.CompletedTaskWithTrueResult;
2556
Common
.ContractAssertMonitorStatus(Observable._SubscriptionLock, held: false);
2593
Common
.ThrowAsync(exc);
Blocks\ActionBlock.cs (9)
119
Common
.WireCancellationToComplete(
144
if (!
Common
.IsCooperativeCancellation(exc)) throw;
176
if (caughtException != null && !
Common
.IsCooperativeCancellation(caughtException))
178
Common
.StoreDataflowMessageValueIntoExceptionData(caughtException, messageWithId.Key);
196
}, this, CancellationToken.None,
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
285
_defaultTarget.OfferMessage(
Common
.SingleMessageHeader, item, null, false) == DataflowMessageStatus.Accepted :
312
return
Common
.GetNameForDebugger(this, _defaultTarget != null ? _defaultTarget.DataflowBlockOptions : _spscTarget!.DataflowBlockOptions);
317
$"{(
Common
.GetNameForDebugger(this, _defaultTarget != null ? _defaultTarget.DataflowBlockOptions : _spscTarget!.DataflowBlockOptions))}, InputCount = {InputCountForDebugger}";
381
public int Id { get { return
Common
.GetBlockId(_actionBlock); } }
Blocks\BatchBlock.cs (23)
75
CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
86
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
89
Common
.WireCancellationToComplete(
179
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
183
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
229
public int Id { get { return
Common
.GetBlockId(_batchBlock); } }
492
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
503
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
534
Common
.ReleaseAllPostponedMessages(targetCore._owningBatch,
550
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
563
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
623
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
642
Common
.GetCreationOptionsForTask(isReplacementReplica));
653
Exception? exception =
Common
.StartTaskSafe(_nonGreedyState.TaskForInputProcessing, _dataflowBlockOptions.TaskScheduler);
658
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
667
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
732
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
757
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
875
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
984
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1035
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1085
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1118
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
Blocks\BatchedJoinBlock.cs (12)
104
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
107
Common
.WireCancellationToComplete(
209
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
213
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
257
public int Id { get { return
Common
.GetBlockId(_batchedJoinBlock); } }
356
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
359
Common
.WireCancellationToComplete(
467
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
471
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
517
public int Id { get { return
Common
.GetBlockId(_batchedJoinBlock); } }
562
Common
.ContractAssertMonitorStatus(_sharedResources._incomingLock, held: true);
637
$"{
Common
.GetNameForDebugger(this)} InputCount = {_messages.Count}";
Blocks\BroadcastBlock.cs (33)
96
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
99
Common
.WireCancellationToComplete(
225
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
249
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
261
Common
.GetCreationOptionsForTask(isReplacementReplica));
272
Exception? exception =
Common
.StartTaskSafe(_boundingState.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
277
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
289
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
335
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
377
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
397
Common
.ReleaseAllPostponedMessages(thisBroadcastBlock,
410
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
444
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
447
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, HasValue = {HasValueForDebugger}, Value = {ValueForDebugger}";
486
public int Id { get { return
Common
.GetBlockId(_broadcastBlock); } }
656
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
675
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
676
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
717
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
718
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
790
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
791
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
826
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
838
Common
.GetCreationOptionsForTask(isReplacementReplica));
848
Exception? exception =
Common
.StartTaskSafe(_taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
870
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
921
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
922
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
953
this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
1028
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(_completionTask.Task, target);
1039
return
Common
.CreateUnlinker(OutgoingLock, _targetRegistry, target);
1166
Common
.AddException(ref _exceptions, exception);
1180
Common
.AddException(ref _exceptions, exception);
Blocks\BufferBlock.cs (15)
78
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
81
Common
.WireCancellationToComplete(
226
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
250
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
262
Common
.GetCreationOptionsForTask(isReplacementReplica));
273
Exception? exception =
Common
.StartTaskSafe(_boundingState.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
278
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
291
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
337
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
380
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
400
Common
.ReleaseAllPostponedMessages(thisBufferBlock,
413
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
427
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
431
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, Count = {CountForDebugger}";
474
public int Id { get { return
Common
.GetBlockId(_bufferBlock); } }
Blocks\JoinBlock.cs (41)
89
CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
100
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
103
Common
.WireCancellationToComplete(
190
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
194
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, OutputCount = {OutputCountForDebugger}";
233
public int Id { get { return
Common
.GetBlockId(_joinBlock); } }
314
CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
325
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
328
Common
.WireCancellationToComplete(
420
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
424
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)} OutputCount = {OutputCountForDebugger}";
463
public int Id { get { return
Common
.GetBlockId(_joinBlock); } }
527
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
548
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
558
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
576
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
586
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
597
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
612
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
652
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
694
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
740
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
764
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
779
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
788
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
806
Common
.ReleaseAllPostponedMessages(this, _nonGreedy.PostponedMessages, ref exceptions);
961
return $"{
Common
.GetNameForDebugger(this)} InputCount = {InputCountForDebugger}, Join = \"{(displayJoin != null ? displayJoin.Content : _sharedResources._ownerJoin)}\"";
1102
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1116
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1171
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1220
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1238
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1251
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1263
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1278
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1283
Common
.GetCreationOptionsForTask(isReplacementReplica));
1294
Exception? exception =
Common
.StartTaskSafe(_taskForInputProcessing, _dataflowBlockOptions.TaskScheduler);
1312
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1350
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
1359
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1425
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
Blocks\TransformBlock.cs (11)
148
}, _source, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
159
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
162
Common
.WireCancellationToComplete(
187
if (!
Common
.IsCooperativeCancellation(exc)) throw;
244
if (caughtException != null && !
Common
.IsCooperativeCancellation(caughtException))
246
Common
.StoreDataflowMessageValueIntoExceptionData(caughtException, messageWithId.Key);
265
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
291
Common
.StoreDataflowMessageValueIntoExceptionData(aggregate, messageWithId.Key, targetInnerExceptions: true);
400
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
404
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, InputCount = {InputCountForDebugger}, OutputCount = {OutputCountForDebugger}";
448
public int Id { get { return
Common
.GetBlockId(_transformBlock); } }
Blocks\TransformManyBlock.cs (14)
144
}, source, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
155
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
158
Common
.WireCancellationToComplete(
180
catch (Exception exc) when (
Common
.IsCooperativeCancellation(exc))
211
if (caughtException != null && !
Common
.IsCooperativeCancellation(caughtException))
213
Common
.StoreDataflowMessageValueIntoExceptionData(caughtException, messageWithId.Key);
246
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously),
272
if (!
Common
.IsCooperativeCancellation(exc))
277
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageWithId.Key);
287
Common
.StoreDataflowMessageValueIntoExceptionData(aggregate, messageWithId.Key, targetInnerExceptions: true);
351
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
606
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
610
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, InputCount = {InputCountForDebugger}, OutputCount = {OutputCountForDebugger}";
654
public int Id { get { return
Common
.GetBlockId(_transformManyBlock); } }
Blocks\TransformManyBlock.IAsyncEnumerable.cs (3)
69
if (!
Common
.IsCooperativeCancellation(exc))
74
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageWithId.Key);
123
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
Blocks\WriteOnceBlock.cs (15)
97
Common
.WireCancellationToComplete(
116
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
124
Common
.GetCreationOptionsForTask());
134
Exception? exception =
Common
.StartTaskSafe(taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
145
Tuple.Create(this, exceptions), CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
193
if (Interlocked.CompareExchange(ref _lazyCompletionTaskSource,
Common
.CompletedVoidResultTaskCompletionSource, null) != null)
325
return
Common
.CreateUnlinker(ValueLock, _targetRegistry, target);
338
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(Completion, target);
369
_header =
Common
.SingleMessageHeader;
455
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
482
Common
.StoreDataflowMessageValueIntoExceptionData(exc, _value!);
483
Common
.AddException(ref exceptions, exc);
515
public override string ToString() { return
Common
.GetNameForDebugger(this, _dataflowBlockOptions); }
519
$"{
Common
.GetNameForDebugger(this, _dataflowBlockOptions)}, HasValue = {HasValue}, Value = {Value}";
541
public int Id { get { return
Common
.GetBlockId(_writeOnceBlock); } }
Internal\Common.cs (8)
106
Task? t =
Common
.GetPotentiallyNotSupportedCompletionTask(block);
205
reg, cancellationToken,
Common
.GetContinuationOptions(), TaskScheduler.Default);
245
StoreStringIntoExceptionData(exc,
Common
.EXCEPTIONDATAKEY_DATAFLOWMESSAGEVALUE, strValue);
256
StoreStringIntoExceptionData(innerException,
Common
.EXCEPTIONDATAKEY_DATAFLOWMESSAGEVALUE, strValue);
262
StoreStringIntoExceptionData(exc.InnerException,
Common
.EXCEPTIONDATAKEY_DATAFLOWMESSAGEVALUE, strValue);
527
Common
.AddException(ref exceptions, exc);
573
sourceCompletionTask.ContinueWith(static (task, state) =>
Common
.PropagateCompletion(task, (IDataflowBlock)state!, AsyncExceptionHandler),
574
target, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
Internal\DataflowEtwProvider.cs (9)
72
Common
.GetNameForDebugger(block, dataflowBlockOptions),
73
Common
.GetBlockId(block));
100
TaskLaunchedForMessageHandling(
Common
.GetBlockId(block), reason, availableMessages, task.Id);
133
Task? completionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(block);
147
DataflowBlockCompleted(
Common
.GetBlockId(block), reason, exceptionData);
185
DataflowBlockLinking(
Common
.GetBlockId(source),
Common
.GetBlockId(target));
208
DataflowBlockUnlinking(
Common
.GetBlockId(source),
Common
.GetBlockId(target));
Internal\ReorderingBuffer.cs (7)
71
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
72
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
97
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
98
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
123
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
124
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
157
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
Internal\SourceCore.cs (22)
140
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletion(_completionTask.Task, target, exceptionHandler: null);
152
return
Common
.CreateUnlinker(OutgoingLock, _targetRegistry, target);
158
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(_completionTask.Task, target);
466
Common
.AddException(ref _exceptions, exception);
480
Common
.AddException(ref _exceptions, exception);
493
Common
.AddException(ref _exceptions, aggregateException, unwrapInnerExceptions: true);
529
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
543
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
544
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
674
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
675
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
723
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
740
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
750
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
760
Common
.GetCreationOptionsForTask(isReplacementReplica));
770
Exception? exception =
Common
.StartTaskSafe(_taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
792
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
892
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
893
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
915
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
916
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
926
this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
Internal\SpscTargetCore.cs (3)
168
this, CancellationToken.None,
Common
.GetCreationOptionsForTask(isReplica));
223
if (!
Common
.IsCooperativeCancellation(exc))
226
Common
.StoreDataflowMessageValueIntoExceptionData<TInput>(exc, nextMessage!, false);
Internal\TargetCore.cs (25)
51
private static readonly
Common
.KeepAlivePredicate<TargetCore<TInput>, KeyValuePair<TInput, long>> _keepAlivePredicate =
155
Common
.AddException(ref _exceptions, exception, unwrapInnerExceptions);
218
Debug.Assert(messageId !=
Common
.INVALID_REORDERING_ID, "The assigned message ID is invalid.");
298
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
314
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
340
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
355
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
373
Common
.GetCreationOptionsForTask(repeat));
384
Exception? exception =
Common
.StartTaskSafe(taskForInputProcessing, _dataflowBlockOptions.TaskScheduler);
390
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
398
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
450
if (numberOfMessagesProcessedSinceTheLastKeepAlive >
Common
.KEEP_ALIVE_NUMBER_OF_MESSAGES_THRESHOLD) break;
463
if (!
Common
.TryKeepAliveUntil(_keepAlivePredicate, this, out messageWithId))
467
_keepAliveBanCounter =
Common
.KEEP_ALIVE_BAN_COUNT;
484
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageWithId.Key);
524
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
577
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
618
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
622
long messageId =
Common
.INVALID_REORDERING_ID;
660
Debug.Assert(messageId !=
Common
.INVALID_REORDERING_ID, "The assigned message ID is invalid.");
715
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
731
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
746
this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
765
Common
.ReleaseAllPostponedMessages(_owningTarget, _boundingState.PostponedMessages, ref _exceptions);
812
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
Internal\TargetRegistry.cs (3)
202
if (node.PropagateCompletion)
Common
.PropagateCompletion(owningSourceCompletion, node.Target,
Common
.AsyncExceptionHandler);
362
return $"{
Common
.GetNameForDebugger(this)} Source = \"{(displaySource != null ? displaySource.Content : _owningSource)}\", Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\"";