Pickaxe.Runtime.RuntimeBase.StopImpl C# (CSharp) Method

StopImpl() private method

private StopImpl ( System.Action action ) : void
action System.Action
return void
        private void StopImpl(Action action)
        {
            Log.Info("Program stopping......");

            ExecutingThread.Abort();
            IsRunning = false;

            //We need to wait here until all download threads are fully killed.
            foreach (var thread in DownloadThreads)
                thread.Join(); //wait for all workers to stop

            if (action != null)
                action();
        }