public void Stop() { lock (this) { if (_running == false || _threads == null) return; _running = false; _works.Cancel(); foreach (Thread th in _threads) th.Join(); _works.Clear(); _threads = null; } }
public static void Release() { _dispatchThread.Stop(); _workerThread.Stop(); }