public void Stop() { if (ActiveThread.IsAlive) { ContinueThread = false; ActiveThread.Join(2000); } }
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"); } }