Example #1
0
 public void Stop()
 {
     if (ActiveThread.IsAlive)
     {
         ContinueThread = false;
         ActiveThread.Join(2000);
     }
 }
Example #2
0
 public void Stop()
 {
     if (ActiveThread.IsAlive)
     {
         Logger?.Info("Closing Thread");
         DerivedStop();
         ContinueThread = false;
         ActiveThread.Join(2000);
         Cleanup();
     }
     else
     {
         ContinueThread = false;
         Logger?.Warn("Current thread is not running, cannot stop");
     }
 }