예제 #1
0
        public void Stop()
        {
            lock (this)
            {
                if (_running == false || _threads == null)
                {
                    return;
                }


                _running = false;
                _works.Cancel();

                foreach (Thread th in _threads)
                {
                    th.Join();
                }
                _threads = null;
            }
        }