Example #1
0
 /// <summary>
 /// Main routine for datafeed analysis.
 /// </summary>
 /// <remarks>This is a hot-thread and should be kept extremely lean. Modify with caution.</remarks>
 public void Run()
 {
     try
     {
         _controller.WaitHandle.WaitOne();
     }
     catch (Exception err)
     {
         Log.Error("FileSystemDataFeed.Run(): Encountered an error: " + err.Message);
         if (!_cancellationTokenSource.IsCancellationRequested)
         {
             _cancellationTokenSource.Cancel();
         }
     }
     finally
     {
         Log.Trace("FileSystemDataFeed.Run(): Ending Thread... ");
         if (_controller != null)
         {
             _controller.Dispose();
         }
         IsActive = false;
     }
 }