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

◆ QueryEnd()

void System.Linq.Parallel.QueryTaskGroupState.QueryEnd ( bool userInitiatedDispose)
inlinepackage

Definition at line 33 of file QueryTaskGroupState.cs.

34 {
35 if (Interlocked.Exchange(ref _alreadyEnded, 1) != 0)
36 {
37 return;
38 }
39 try
40 {
42 }
43 catch (AggregateException ex)
44 {
45 AggregateException ex2 = ex.Flatten();
46 bool flag = true;
47 for (int i = 0; i < ex2.InnerExceptions.Count; i++)
48 {
49 if (!(ex2.InnerExceptions[i] is OperationCanceledException { CancellationToken: { IsCancellationRequested: not false } } ex3) || ex3.CancellationToken != _cancellationState.ExternalCancellationToken)
50 {
51 flag = false;
52 break;
53 }
54 }
55 if (!flag || ex2.InnerExceptions.Count == 0)
56 {
57 throw ex2;
58 }
59 }
60 finally
61 {
62 ((IDisposable)_rootTask)?.Dispose();
63 }
65 {
67 {
69 }
70 if (!userInitiatedDispose)
71 {
72 throw new ObjectDisposedException("enumerator", System.SR.PLINQ_DisposeRequested);
73 }
74 }
75 }
static void ThrowWithStandardMessageIfCanceled(CancellationToken externalCancellationToken)
readonly CancellationState _cancellationState
static string PLINQ_DisposeRequested
Definition SR.cs:28
Definition SR.cs:7
static int Exchange(ref int location1, int value)

References System.Linq.Parallel.QueryTaskGroupState._alreadyEnded, System.Linq.Parallel.QueryTaskGroupState._cancellationState, System.Linq.Parallel.QueryTaskGroupState._rootTask, System.Threading.Interlocked.Exchange(), System.Linq.Parallel.CancellationState.ExternalCancellationToken, System.AggregateException.Flatten(), System.AggregateException.InnerExceptions, and System.Threading.Tasks.Task< TResult >.Wait().

Referenced by System.Linq.Parallel.MergeEnumerator< TInputOutput >.Dispose(), System.Linq.Parallel.AsynchronousChannelMergeEnumerator< T >.MoveNextSlowPath(), System.Linq.Parallel.OrderPreservingSpoolingTask< TInputOutput, TKey >.Spool(), System.Linq.Parallel.SpoolingTask.SpoolForAll< TInputOutput, TIgnoreKey >(), System.Linq.Parallel.SpoolingTask.SpoolStopAndGo< TInputOutput, TIgnoreKey >(), and System.Linq.Parallel.OrderPreservingPipeliningMergeHelper< TOutput, TKey >.OrderedPipeliningMergeEnumerator.ThrowIfInTearDown().