311 references to Common
System.Threading.Tasks.Dataflow (311)
Base\DataflowBlock.cs (58)
194
return $"{
Common
.GetNameForDebugger(this)} Source = \"{(displaySource != null ? displaySource.Content : _source)}\", Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\"";
241
return target.OfferMessage(
Common
.SingleMessageHeader, item, source: null, consumeToAccept: false) == DataflowMessageStatus.Accepted;
292
return
Common
.CreateTaskFromCancellation<bool>(cancellationToken);
300
switch (target.OfferMessage(
Common
.SingleMessageHeader, item, source: null, consumeToAccept: false))
304
return
Common
.CompletedTaskWithTrueResult;
308
return
Common
.CompletedTaskWithFalseResult;
330
Common
.StoreDataflowMessageValueIntoExceptionData(exc, item);
331
return
Common
.CreateTaskFromException<bool>(exc);
513
CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
527
CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
540
SendAsyncSource<TOutput>? source =
Common
.UnwrapWeakReference<SendAsyncSource<TOutput>>(state!);
570
Common
.SingleMessageHeader, _messageValue, this, consumeToAccept: consumeToAccept))
612
Common
.StoreDataflowMessageValueIntoExceptionData(exc, _messageValue);
634
bool validMessage = (messageHeader.Id ==
Common
.SINGLE_MESSAGE_ID);
673
bool reservable = (messageHeader.Id ==
Common
.SINGLE_MESSAGE_ID);
687
if (messageHeader.Id !=
Common
.SINGLE_MESSAGE_ID)
724
return $"{
Common
.GetNameForDebugger(this)} Message = {_messageValue}, Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\"";
788
return ReceiveAsync(source,
Common
.InfiniteTimeSpan, CancellationToken.None);
805
return ReceiveAsync(source,
Common
.InfiniteTimeSpan, cancellationToken);
848
if (!
Common
.IsValidTimeout(timeout)) throw new ArgumentOutOfRangeException(nameof(timeout), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
866
return Receive(source,
Common
.InfiniteTimeSpan, CancellationToken.None);
884
return Receive(source,
Common
.InfiniteTimeSpan, cancellationToken);
930
if (!
Common
.IsValidTimeout(timeout)) throw new ArgumentOutOfRangeException(nameof(timeout), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
979
return
Common
.CreateTaskFromCancellation<TOutput>(cancellationToken);
998
return
Common
.CreateTaskFromException<TOutput>(exc);
1006
return
Common
.CreateTaskFromException<TOutput>(ReceiveTarget<TOutput>.CreateExceptionForTimeout());
1180
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageValue);
1227
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1337
return
Common
.InitializeStackTrace(new InvalidOperationException(SR.InvalidOperation_DataNotAvailableForReceive));
1344
return
Common
.InitializeStackTrace(new TimeoutException());
1360
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
1406
cancellationToken.IsCancellationRequested ?
Common
.CreateTaskFromCancellation<bool>(cancellationToken) :
1485
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
1606
return $"{
Common
.GetNameForDebugger(this)} Target = \"{(displayTarget != null ? displayTarget.Content : _target)}\", Source = \"{(displaySource != null ? displaySource.Content : _source)}\"";
1833
return
Common
.CreateTaskFromCancellation<int>(dataflowBlockOptions.CancellationToken);
1850
return
Common
.CreateTaskFromException<int>(exc);
1889
CancellationToken.None,
Common
.GetCreationOptionsForTask(), scheduler);
1953
Common
.AddException(ref exceptions, task.Exception!, unwrapInnerExceptions: true);
1986
}, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
2007
return
Common
.CreateTaskFromCancellation<int>(cts.Token);
2021
return
Common
.CreateTaskFromException<int>(exc);
2055
}, CancellationToken.None,
Common
.GetContinuationOptions(), scheduler);
2090
Common
.WireCancellationToComplete(cancellationToken, base.Task,
2138
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this)} IsCompleted = {base.Task.IsCompleted}";
2209
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(_source);
2222
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: false);
2224
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(_source);
2272
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: false);
2302
Common
.ContractAssertMonitorStatus(_SubscriptionLock, held: true);
2385
Common
.GetContinuationOptions(TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously),
2390
Task? sourceCompletionTask =
Common
.GetPotentiallyNotSupportedCompletionTask(Observable._source);
2398
Common
.GetContinuationOptions(TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.ExecuteSynchronously),
2400
}, this, Canceler.Token,
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
2407
Common
.ContractAssertMonitorStatus(Observable._SubscriptionLock, held: false);
2453
return
Common
.CreateTaskFromException<VoidResult>(exc);
2458
return
Common
.CompletedTaskWithTrueResult;
2469
Common
.ContractAssertMonitorStatus(Observable._SubscriptionLock, held: false);
2506
Common
.ThrowAsync(exc);
Blocks\ActionBlock.cs (9)
113
Common
.WireCancellationToComplete(
138
if (!
Common
.IsCooperativeCancellation(exc)) throw;
170
if (caughtException != null && !
Common
.IsCooperativeCancellation(caughtException))
172
Common
.StoreDataflowMessageValueIntoExceptionData(caughtException, messageWithId.Key);
190
}, this, CancellationToken.None,
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
276
_defaultTarget.OfferMessage(
Common
.SingleMessageHeader, item, null, false) == DataflowMessageStatus.Accepted :
303
return
Common
.GetNameForDebugger(this, _defaultTarget != null ? _defaultTarget.DataflowBlockOptions : _spscTarget!.DataflowBlockOptions);
308
$"{(
Common
.GetNameForDebugger(this, _defaultTarget != null ? _defaultTarget.DataflowBlockOptions : _spscTarget!.DataflowBlockOptions))}, InputCount = {InputCountForDebugger}";
372
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(
176
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
180
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
226
public int Id { get { return
Common
.GetBlockId(_batchBlock); } }
489
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
500
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
531
Common
.ReleaseAllPostponedMessages(targetCore._owningBatch,
547
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
560
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
620
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
639
Common
.GetCreationOptionsForTask(isReplacementReplica));
650
Exception? exception =
Common
.StartTaskSafe(_nonGreedyState.TaskForInputProcessing, _dataflowBlockOptions.TaskScheduler);
655
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
664
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
729
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
754
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
872
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
981
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1032
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1082
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1115
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
Blocks\BatchedJoinBlock.cs (12)
104
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
107
Common
.WireCancellationToComplete(
206
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
210
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
254
public int Id { get { return
Common
.GetBlockId(_batchedJoinBlock); } }
353
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
356
Common
.WireCancellationToComplete(
461
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
465
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, BatchSize = {BatchSize}, OutputCount = {OutputCountForDebugger}";
511
public int Id { get { return
Common
.GetBlockId(_batchedJoinBlock); } }
556
Common
.ContractAssertMonitorStatus(_sharedResources._incomingLock, held: true);
628
$"{
Common
.GetNameForDebugger(this)} InputCount = {_messages.Count}";
Blocks\BroadcastBlock.cs (33)
93
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
96
Common
.WireCancellationToComplete(
219
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
243
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
255
Common
.GetCreationOptionsForTask(isReplacementReplica));
266
Exception? exception =
Common
.StartTaskSafe(_boundingState.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
271
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
283
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
329
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
371
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
391
Common
.ReleaseAllPostponedMessages(thisBroadcastBlock,
404
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
438
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
441
private object DebuggerDisplayContent => $"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, HasValue = {HasValueForDebugger}, Value = {ValueForDebugger}";
480
public int Id { get { return
Common
.GetBlockId(_broadcastBlock); } }
650
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
669
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
670
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
711
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
712
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
784
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
785
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
820
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
832
Common
.GetCreationOptionsForTask(isReplacementReplica));
842
Exception? exception =
Common
.StartTaskSafe(_taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
864
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
915
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
916
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
947
this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
1016
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(_completionTask.Task, target);
1027
return
Common
.CreateUnlinker(OutgoingLock, _targetRegistry, target);
1154
Common
.AddException(ref _exceptions, exception);
1168
Common
.AddException(ref _exceptions, exception);
Blocks\BufferBlock.cs (15)
75
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
78
Common
.WireCancellationToComplete(
220
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
244
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
256
Common
.GetCreationOptionsForTask(isReplacementReplica));
267
Exception? exception =
Common
.StartTaskSafe(_boundingState.TaskForInputProcessing, _source.DataflowBlockOptions.TaskScheduler);
272
exception, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
285
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
331
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
374
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
394
Common
.ReleaseAllPostponedMessages(thisBufferBlock,
407
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
421
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
425
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, Count = {CountForDebugger}";
468
public int Id { get { return
Common
.GetBlockId(_bufferBlock); } }
Blocks\JoinBlock.cs (41)
86
CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
97
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
100
Common
.WireCancellationToComplete(
184
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
188
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, OutputCount = {OutputCountForDebugger}";
227
public int Id { get { return
Common
.GetBlockId(_joinBlock); } }
305
CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
316
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
319
Common
.WireCancellationToComplete(
408
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
412
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)} OutputCount = {OutputCountForDebugger}";
451
public int Id { get { return
Common
.GetBlockId(_joinBlock); } }
515
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
536
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
546
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
564
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
574
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
585
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
600
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
640
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
682
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
728
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true);
752
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
767
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
776
Common
.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false);
794
Common
.ReleaseAllPostponedMessages(this, _nonGreedy.PostponedMessages, ref exceptions);
946
return $"{
Common
.GetNameForDebugger(this)} InputCount = {InputCountForDebugger}, Join = \"{(displayJoin != null ? displayJoin.Content : _sharedResources._ownerJoin)}\"";
1087
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1101
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1156
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1205
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1223
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1236
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1248
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1263
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1268
Common
.GetCreationOptionsForTask(isReplacementReplica));
1279
Exception? exception =
Common
.StartTaskSafe(_taskForInputProcessing, _dataflowBlockOptions.TaskScheduler);
1297
Common
.ContractAssertMonitorStatus(IncomingLock, held: true);
1335
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
1344
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
1410
Common
.ContractAssertMonitorStatus(IncomingLock, held: false);
Blocks\TransformBlock.cs (11)
145
}, _source, CancellationToken.None,
Common
.GetContinuationOptions(), TaskScheduler.Default);
156
}, this, CancellationToken.None,
Common
.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
159
Common
.WireCancellationToComplete(
184
if (!
Common
.IsCooperativeCancellation(exc)) throw;
241
if (caughtException != null && !
Common
.IsCooperativeCancellation(caughtException))
243
Common
.StoreDataflowMessageValueIntoExceptionData(caughtException, messageWithId.Key);
262
Common
.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
288
Common
.StoreDataflowMessageValueIntoExceptionData(aggregate, messageWithId.Key, targetInnerExceptions: true);
394
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
398
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, InputCount = {InputCountForDebugger}, OutputCount = {OutputCountForDebugger}";
442
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.");
603
public override string ToString() { return
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions); }
607
$"{
Common
.GetNameForDebugger(this, _source.DataflowBlockOptions)}, InputCount = {InputCountForDebugger}, OutputCount = {OutputCountForDebugger}";
651
public int Id { get { return
Common
.GetBlockId(_transformManyBlock); } }
Blocks\TransformManyBlock.IAsyncEnumerable.cs (3)
66
if (!
Common
.IsCooperativeCancellation(exc))
71
Common
.StoreDataflowMessageValueIntoExceptionData(exc, messageWithId.Key);
120
Debug.Assert(id !=
Common
.INVALID_REORDERING_ID, "This ID should never have been handed out.");
Blocks\WriteOnceBlock.cs (15)
94
Common
.WireCancellationToComplete(
113
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
121
Common
.GetCreationOptionsForTask());
131
Exception? exception =
Common
.StartTaskSafe(taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
142
Tuple.Create(this, exceptions), CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
190
if (Interlocked.CompareExchange(ref _lazyCompletionTaskSource,
Common
.CompletedVoidResultTaskCompletionSource, null) != null)
313
return
Common
.CreateUnlinker(ValueLock, _targetRegistry, target);
326
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(Completion, target);
357
_header =
Common
.SingleMessageHeader;
443
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
470
Common
.StoreDataflowMessageValueIntoExceptionData(exc, _value!);
471
Common
.AddException(ref exceptions, exc);
503
public override string ToString() { return
Common
.GetNameForDebugger(this, _dataflowBlockOptions); }
507
$"{
Common
.GetNameForDebugger(this, _dataflowBlockOptions)}, HasValue = {HasValue}, Value = {Value}";
529
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)
134
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletion(_completionTask.Task, target, exceptionHandler: null);
146
return
Common
.CreateUnlinker(OutgoingLock, _targetRegistry, target);
152
if (linkOptions.PropagateCompletion)
Common
.PropagateCompletionOnceCompleted(_completionTask.Task, target);
460
Common
.AddException(ref _exceptions, exception);
474
Common
.AddException(ref _exceptions, exception);
487
Common
.AddException(ref _exceptions, aggregateException, unwrapInnerExceptions: true);
523
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
537
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
538
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
668
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
669
Common
.ContractAssertMonitorStatus(ValueLock, held: false);
717
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
734
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
744
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
754
Common
.GetCreationOptionsForTask(isReplacementReplica));
764
Exception? exception =
Common
.StartTaskSafe(_taskForOutputProcessing, _dataflowBlockOptions.TaskScheduler);
786
}, this, CancellationToken.None,
Common
.GetCreationOptionsForTask(), TaskScheduler.Default);
886
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
887
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
909
Common
.ContractAssertMonitorStatus(OutgoingLock, held: true);
910
Common
.ContractAssertMonitorStatus(ValueLock, held: true);
920
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)}\"";