Beispiel #1
0
 private void Stop()
 {
     _needToQuit = true;
     _agentStarter.Stop();
     _pathScanner.Stop();
     UpdateHasWork();
 }
Beispiel #2
0
        private void Stop()
        {
            if (_cancellationTokenSource.IsCancellationRequested)
            {
                return;
            }

            Task.Factory.StartNew(WaitForShutdown, TaskCreationOptions.LongRunning);
            _needToQuit = true;
            _cancellationTokenSource.Cancel();
            _agentStarter.Stop();
            _pathScanner.Stop();
            UpdateHasWork();
        }