public void StopLogging() { if (ContinueThread || LogThread.IsAlive) { ContinueThread = false; LogThread.Join(1000); } }
public void Stop() { Trading = false; if (TradeThread?.ThreadState == ThreadState.Running) { TradeThread.Join(); } if (LogThread.ThreadState == ThreadState.WaitSleepJoin) { LogThread.Abort(); } else if (LogThread.ThreadState == ThreadState.Running) { LogThread.Join(); } }