Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CompleteBlockAsync()

void System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.CompleteBlockAsync ( IList< Exception > exceptions)
inlineprivate

Definition at line 121 of file WriteOnceBlock.cs.

122 {
123 if (exceptions == null)
124 {
125 Task task = new Task(delegate(object state)
126 {
127 ((WriteOnceBlock<T>)state).OfferToTargetsAndCompleteBlock();
130 if (log.IsEnabled())
131 {
132 log.TaskLaunchedForMessageHandling(this, task, DataflowEtwProvider.TaskLaunchedReason.OfferingOutputMessages, _header.IsValid ? 1 : 0);
133 }
135 if (ex != null)
136 {
138 }
139 }
140 else
141 {
142 Task.Factory.StartNew(delegate(object state)
143 {
145 tuple.Item1.CompleteBlock(tuple.Item2);
146 }, Tuple.Create(this, exceptions), CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
147 }
148 }
static Exception StartTaskSafe(Task task, TaskScheduler scheduler)
Definition Common.cs:277
static TaskCreationOptions GetCreationOptionsForTask(bool isReplacementReplica=false)
Definition Common.cs:267
void CompleteCore(Exception exception, bool storeExceptionEvenIfAlreadyCompleting)
readonly DataflowBlockOptions _dataflowBlockOptions

References System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._dataflowBlockOptions, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._header, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.CompleteCore(), System.Threading.Tasks.TaskScheduler.Default, System.exceptions, System.Threading.Tasks.Task< TResult >.Factory, System.Threading.Tasks.Dataflow.Internal.Common.GetCreationOptionsForTask(), System.Threading.Tasks.Dataflow.DataflowMessageHeader.IsValid, System.Threading.Tasks.Dataflow.Internal.DataflowEtwProvider.Log, System.Threading.CancellationToken.None, System.Threading.Tasks.Dataflow.Internal.Common.StartTaskSafe(), System.state, System.task, and System.Threading.Tasks.Dataflow.DataflowBlockOptions.TaskScheduler.

Referenced by System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.CompleteCore(), and System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.OfferMessage().