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

◆ AsyncCompleteProcessMessageWithTask()

void System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.AsyncCompleteProcessMessageWithTask ( Task< IEnumerable< TOutput > > completed,
KeyValuePair< TInput, long > messageWithId )
inlineprivate

Definition at line 227 of file TransformManyBlock.cs.

228 {
229 switch (completed.Status)
230 {
231 case TaskStatus.RanToCompletion:
232 {
233 IEnumerable<TOutput> result = completed.Result;
234 try
235 {
237 }
238 catch (Exception ex)
239 {
241 {
242 Common.StoreDataflowMessageValueIntoExceptionData(ex, messageWithId.Key);
244 }
245 }
246 break;
247 }
248 case TaskStatus.Faulted:
249 {
250 AggregateException exception = completed.Exception;
251 Common.StoreDataflowMessageValueIntoExceptionData(exception, messageWithId.Key, targetInnerExceptions: true);
253 goto case TaskStatus.Canceled;
254 }
255 case TaskStatus.Canceled:
257 break;
258 }
259 _target.SignalOneAsyncMessageCompleted();
260 }
static bool IsCooperativeCancellation(Exception exception)
Definition Common.cs:88
void StoreOutputItems(KeyValuePair< TInput, long > messageWithId, IEnumerable< TOutput > outputItems)

References System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >._target, System.exception, System.Threading.Tasks.Dataflow.Internal.Common.IsCooperativeCancellation(), and System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.StoreOutputItems().