4 writes to CancellationToken
Microsoft.Build.Tasks.Core (1)
Copy.cs (1)
565CancellationToken = _cancellationTokenSource.Token
System.Threading.Tasks.Dataflow (3)
Base\DataflowBlockOptions.cs (3)
96CancellationToken = this.CancellationToken, 267CancellationToken = this.CancellationToken, 399CancellationToken = this.CancellationToken,
36 references to CancellationToken
System.Threading.Tasks.Dataflow (36)
Base\DataflowBlock.cs (4)
1913if (dataflowBlockOptions.CancellationToken.IsCancellationRequested) 1914return Common.CreateTaskFromCancellation<int>(dataflowBlockOptions.CancellationToken); 2004CancellationTokenSource cts = CancellationTokenSource.CreateLinkedTokenSource(dataflowBlockOptions.CancellationToken, CancellationToken.None); 2061result.TrySetCanceled(dataflowBlockOptions.CancellationToken);
Base\DataflowBlockOptions.cs (3)
96CancellationToken = this.CancellationToken, 267CancellationToken = this.CancellationToken, 399CancellationToken = this.CancellationToken,
Blocks\ActionBlock.cs (2)
89!dataflowBlockOptions.CancellationToken.CanBeCanceled && 120dataflowBlockOptions.CancellationToken, Completion, static (state, _) => ((TargetCore<TInput>)state!).Complete(exception: null, dropPendingMessages: true), _defaultTarget);
Blocks\BatchBlock.cs (3)
90dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((BatchBlockTargetCore)state!).Complete(exception: null, dropPendingMessages: true, releaseReservedMessages: false), _target); 335if (!_decliningPermanently && !_dataflowBlockOptions.CancellationToken.IsCancellationRequested) 483return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || _owningBatch._source.HasExceptions;
Blocks\BatchedJoinBlock.cs (2)
108dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((BatchedJoinBlock<T1, T2>)state!).CompleteEachTarget(), this); 360dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((BatchedJoinBlock<T1, T2, T3>)state!).CompleteEachTarget(), this);
Blocks\BroadcastBlock.cs (4)
100dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((BroadcastBlock<T>)state!).Complete(), this); 989else if (_dataflowBlockOptions.CancellationToken.IsCancellationRequested) 991_completionTask.TrySetCanceled(_dataflowBlockOptions.CancellationToken); 1153return _dataflowBlockOptions.CancellationToken.IsCancellationRequested ||
Blocks\BufferBlock.cs (1)
82dataflowBlockOptions.CancellationToken, _source.Completion, static (owningSource, _) => ((BufferBlock<T>)owningSource!).Complete(), this);
Blocks\JoinBlock.cs (3)
104dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((JoinBlock<T1, T2>)state!)._sharedResources.CompleteEachTarget(), this); 329dataflowBlockOptions.CancellationToken, _source.Completion, static (state, _) => ((JoinBlock<T1, T2, T3>)state!)._sharedResources.CompleteEachTarget(), this); 1239return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || _hasExceptions;
Blocks\TransformBlock.cs (1)
163dataflowBlockOptions.CancellationToken, Completion, static (state, _) => ((TargetCore<TInput>)state!).Complete(exception: null, dropPendingMessages: true), _target);
Blocks\TransformManyBlock.cs (1)
159dataflowBlockOptions.CancellationToken, Completion, static (state, _) => ((TargetCore<TInput>)state!).Complete(exception: null, dropPendingMessages: true), target);
Blocks\WriteOnceBlock.cs (6)
81if (dataflowBlockOptions.CancellationToken.CanBeCanceled) 87if (dataflowBlockOptions.CancellationToken.IsCancellationRequested) 92_lazyCompletionTaskSource.TrySetCanceled(dataflowBlockOptions.CancellationToken); 98dataflowBlockOptions.CancellationToken, _lazyCompletionTaskSource.Task, static (state, _) => ((WriteOnceBlock<T>)state!).Complete(), this); 183else if (_dataflowBlockOptions.CancellationToken.IsCancellationRequested) 185CompletionTaskSource.TrySetCanceled(_dataflowBlockOptions.CancellationToken);
Internal\SourceCore.cs (3)
884return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || 963else if (_dataflowBlockOptions.CancellationToken.IsCancellationRequested) 965_completionTask.TrySetCanceled(_dataflowBlockOptions.CancellationToken);
Internal\TargetCore.cs (3)
708return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || Volatile.Read(ref _exceptions) != null; 784else if (_dataflowBlockOptions.CancellationToken.IsCancellationRequested) 786_completionSource.TrySetCanceled(_dataflowBlockOptions.CancellationToken);