13 references to Cancellation
System.Threading.Tasks.Parallel (13)
System\Threading\Tasks\Parallel.ForEachAsync.cs (13)
105
while (!state.
Cancellation
.IsCancellationRequested)
129
if (state.
Cancellation
.IsCancellationRequested || // check now that the lock has been acquired
156
await state.LoopBody(element, state.
Cancellation
.Token);
269
while (!state.
Cancellation
.IsCancellationRequested)
276
if (state.
Cancellation
.IsCancellationRequested || // check now that the lock has been acquired
301
await state.LoopBody(element, state.
Cancellation
.Token);
424
while (!state.
Cancellation
.IsCancellationRequested)
431
if (state.
Cancellation
.IsCancellationRequested || // check now that the lock has been acquired
456
await state.LoopBody(element, state.
Cancellation
.Token);
553
_registration = cancellationToken.UnsafeRegister(static o => ((ForEachAsyncState<TSource>)o!).
Cancellation
.Cancel(), this);
626
Cancellation
.Cancel();
653
Debug.Assert(!
Cancellation
.IsCancellationRequested);
718
Enumerator = source.GetAsyncEnumerator(
Cancellation
.Token) ?? throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator);