public void Finish(bool wait, int timeout = -1) { _startedRunning.Wait(timeout); if (_blockingQueueSourceAdapter == null) { throw new InvalidOperationException("Can't call BlockingQueueDataPipeline.Finish(). Pump is not running"); } _blockingQueueSourceAdapter.Finish(); if (wait) { FinishedEvent.WaitOne(timeout); } }
public virtual void Shutdown() { LogManager.GetCurrentClassLogger().Info("Shutting Down {0}", InputType); FinishedEvent.WaitOne(); try { if (File.Exists(CheckpointFileName)) { File.Delete(CheckpointFileName); } } catch (Exception ex) { LogManager.GetCurrentClassLogger().Error(ex); } }