1 write to CancellationState
System.Linq.Parallel (1)
System\Linq\ParallelEnumerable.cs (1)
326settings.CancellationState = new CancellationState(cancellationToken);
112 references to CancellationState
System.Linq.Parallel (112)
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (1)
191outputStream[i] = new AssociativeAggregationOperatorEnumerator<TKey>(inputStream[i], this, i, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (4)
62leftStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 63rightStream, outputRecipient, settings.CancellationState.MergedCancellationToken); 69leftStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 70rightStream, outputRecipient, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (4)
81ExchangeUtilities.HashRepartitionOrdered(leftStream, _leftKeySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 82rightStream, outputRecipient, partitionCount, settings.CancellationState.MergedCancellationToken); 87ExchangeUtilities.HashRepartition(leftStream, _leftKeySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 88rightStream, outputRecipient, partitionCount, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (4)
64leftPartitionedStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 65rightPartitionedStream, outputRecipient, settings.CancellationState.MergedCancellationToken); 71leftPartitionedStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 72rightPartitionedStream, outputRecipient, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (6)
88ExchangeUtilities.HashRepartitionOrdered(leftStreamInt, _leftKeySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 89rightStream, outputRecipient, settings.CancellationState.MergedCancellationToken); 94ExchangeUtilities.HashRepartitionOrdered(leftStream, _leftKeySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 95rightStream, outputRecipient, settings.CancellationState.MergedCancellationToken); 101ExchangeUtilities.HashRepartition(leftStream, _leftKeySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 102rightStream, outputRecipient, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (4)
69leftStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken); 72leftHashStream, rightStream, outputRecipient, partitionCount, settings.CancellationState.MergedCancellationToken); 78leftStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken); 81leftHashStream, rightStream, outputRecipient, partitionCount, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (2)
95settings.CancellationState, settings.QueryId); 106settings.CancellationState, settings.QueryId);
System\Linq\Parallel\QueryOperators\BinaryQueryOperator.cs (1)
112IEnumerable<TOutput> opSequential = _op.AsSequentialQuery(_settings.CancellationState.ExternalCancellationToken);
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (3)
72&& cancelEx.CancellationToken == SpecifiedQuerySettings.CancellationState.ExternalCancellationToken 73&& SpecifiedQuerySettings.CancellationState.ExternalCancellationToken.IsCancellationRequested) 129outputStream[i] = CreateEnumerator<TKey>(i, partitionCount, inputStream[i], null, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (2)
125_querySettings.CancellationState.ExternalCancellationToken); 158CancellationState.ThrowWithStandardMessageIfCanceled(_querySettings.CancellationState.ExternalCancellationToken);
System\Linq\Parallel\QueryOperators\QueryOperator.cs (12)
131IEnumerable<TOutput> opSequential = AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken); 132return ExceptionAggregator.WrapEnumerable(opSequential, querySettings.CancellationState).GetEnumerator(); 144if (querySettings.CancellationState.MergedCancellationToken.IsCancellationRequested) 146querySettings.CancellationState.ExternalCancellationToken.ThrowIfCancellationRequested(); 156querySettings.CancellationState, 203IEnumerable<TOutput> opSequential = AsSequentialQuery(querySettings.CancellationState.ExternalCancellationToken); 204IEnumerable<TOutput> opSequentialWithCancelChecks = CancellableEnumerable.Wrap(opSequential, querySettings.CancellationState.ExternalCancellationToken); 205return ExceptionAggregator.WrapEnumerable(opSequentialWithCancelChecks, querySettings.CancellationState).ToArray(); 214if (querySettings.CancellationState.MergedCancellationToken.IsCancellationRequested) 216querySettings.CancellationState.ExternalCancellationToken.ThrowIfCancellationRequested(); 236OutputOrdered, querySettings.CancellationState, querySettings.QueryId); 291settings.CancellationState, settings.QueryId);
System\Linq\Parallel\QueryOperators\QuerySettings.cs (14)
111if (this.CancellationState.ExternalCancellationToken.CanBeCanceled && settings2.CancellationState.ExternalCancellationToken.CanBeCanceled) 128CancellationToken externalCancellationToken = (this.CancellationState.ExternalCancellationToken.CanBeCanceled) ? this.CancellationState.ExternalCancellationToken : settings2.CancellationState.ExternalCancellationToken; 147QuerySettings settings = new QuerySettings(TaskScheduler, DegreeOfParallelism, CancellationState.ExternalCancellationToken, ExecutionMode, MergeOptions); 150settings.CancellationState.InternalCancellationTokenSource = topLevelCancellationTokenSource; 153settings.CancellationState.MergedCancellationTokenSource = 154CancellationTokenSource.CreateLinkedTokenSource(settings.CancellationState.InternalCancellationTokenSource.Token, settings.CancellationState.ExternalCancellationToken); 157settings.CancellationState.TopLevelDisposedFlag = topLevelDisposedFlag; 159Debug.Assert(settings.CancellationState.InternalCancellationTokenSource != null); 160Debug.Assert(settings.CancellationState.MergedCancellationToken.CanBeCanceled); 161Debug.Assert(settings.CancellationState.TopLevelDisposedFlag != null);
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (1)
115settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (1)
94settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (1)
74inputStream[i], _defaultValue, i, partitionCount, sharedEmptyCount, sharedLatch, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (4)
61inputStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 62recipient, settings.CancellationState.MergedCancellationToken); 68inputStream, null, null, _comparer, settings.CancellationState.MergedCancellationToken), 69recipient, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (2)
90outputStream[i] = new ElementAtQueryOperatorEnumerator(intKeyStream[i], _index, resultFoundFlag, settings.CancellationState.MergedCancellationToken); 131CancellationState cancelState = SpecifiedQuerySettings.CancellationState;
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (1)
89settings.CancellationState.MergedCancellationToken, inputStream.KeyComparer, i);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
92inputStream[i], _elementAction, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (4)
77inputStream, _keySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 79settings.CancellationState.MergedCancellationToken 86inputStream, _keySelector, _keyComparer, null, settings.CancellationState.MergedCancellationToken), 88settings.CancellationState.MergedCancellationToken
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (1)
107outputStream[i] = new IndexedWhereQueryOperatorEnumerator(inputStreamInt[i], _predicate, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (1)
87inputStream[i], _predicate, operatorState, sharedBarrier, settings.CancellationState.MergedCancellationToken,
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (1)
64outputStream[i] = new ReverseQueryOperatorEnumerator<TKey>(inputStream[i], settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (2)
155outputStream[i] = new SelectManyQueryOperatorEnumerator<TLeftKey>(inputStream[i], this, settings.CancellationState.MergedCancellationToken); 174outputStream[i] = new IndexedSelectManyQueryOperatorEnumerator(inputStream[i], this, settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
120settings.CancellationState.MergedCancellationToken, inputStream.KeyComparer);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (1)
146settings.CancellationState.MergedCancellationToken, inputStream.KeyComparer);
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (1)
58settings.CancellationState.MergedCancellationToken);
System\Linq\Parallel\QueryOperators\UnaryQueryOperator.cs (1)
116IEnumerable<TOutput> opSequential = _op.AsSequentialQuery(_settings.CancellationState.ExternalCancellationToken);
System\Linq\ParallelEnumerable.cs (31)
4404ExceptionAggregator.ThrowOCEorAggregateException(ex, settings.CancellationState); 4408DisposeEnumerator<TSource>(e2, settings.CancellationState); 4413DisposeEnumerator<TSource>(e1, settings.CancellationState); 5408IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5409IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5410return ExceptionAggregator.WrapEnumerable(childWithCancelChecks, settings.CancellationState) 5450IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5451IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5452return ExceptionAggregator.WrapEnumerable(childWithCancelChecks, settings.CancellationState) 5453.First(ExceptionAggregator.WrapFunc<TSource, bool>(predicate, settings.CancellationState)); 5491IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5492IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5494settings.CancellationState).FirstOrDefault(); 5536IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5537IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5539childWithCancelChecks, settings.CancellationState) 5540.FirstOrDefault(ExceptionAggregator.WrapFunc<TSource, bool>(predicate, settings.CancellationState)); 5585IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5586IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5587return ExceptionAggregator.WrapEnumerable(childWithCancelChecks, settings.CancellationState).Last(); 5627IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5628IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5630childWithCancelChecks, settings.CancellationState) 5631.Last(ExceptionAggregator.WrapFunc<TSource, bool>(predicate, settings.CancellationState)); 5669IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5670IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5671return ExceptionAggregator.WrapEnumerable(childWithCancelChecks, settings.CancellationState).LastOrDefault(); 5710IEnumerable<TSource> childAsSequential = queryOp.Child.AsSequentialQuery(settings.CancellationState.ExternalCancellationToken); 5711IEnumerable<TSource> childWithCancelChecks = CancellableEnumerable.Wrap(childAsSequential, settings.CancellationState.ExternalCancellationToken); 5713childWithCancelChecks, settings.CancellationState) 5714.LastOrDefault(ExceptionAggregator.WrapFunc<TSource, bool>(predicate, settings.CancellationState));