SonarLint.VisualStudio.Progress.Controller.SequentialProgressController.ThreadSafeDisposeCancellationTokenSource C# (CSharp) Method

ThreadSafeDisposeCancellationTokenSource() private method

private ThreadSafeDisposeCancellationTokenSource ( ) : void
return void
        private void ThreadSafeDisposeCancellationTokenSource()
        {
            if (this.cancellationTokenSource != null)
            {
                lock (this.locker)
                {
                    if (this.cancellationTokenSource != null)
                    {
                        this.cancellationTokenSource.Dispose();
                        this.cancellationTokenSource = null;
                    }
                }
            }
        }