示例#1
0
        /// <summary>
        /// Stops an execution thread, removing it from the pool.
        /// </summary>
        /// <param name="thread">The task thread.</param>
        private static void RemoveTaskThread(TaskThread thread)
        {
            lock (_threadsLock)
            {
                _threads.Remove(thread);
                _stats.SpawnedThreads.Decrement();
            }

            thread.Stop();
        }
示例#2
0
        protected override void OnStop()
        {
            if (!IsRunning)
            {
                return;
            }

            _mainThread.Stop();
            _sendThread.Stop();
            _receThread.Stop();

            _stream.Dispose();
            _client2Gate.Close();

            IsRunning = false;
            Logger.Trace("game server stopped");
        }
示例#3
0
        /// <summary>
        /// Stops an execution thread, removing it from the pool.
        /// </summary>
        /// <param name="thread">The task thread.</param>
        private static void RemoveTaskThread(TaskThread thread)
        {
            lock (_threadsLock)
            {
                _threads.Remove(thread);
                _stats.SpawnedThreads.Decrement();
            }

            thread.Stop();
        }
 public void Stop()
 {
     taskThread.Stop();
     statusThread.Stop();
     sMSSendter.Stop();
 }
示例#5
0
 public void Close()
 {
     _thread.Stop();
 }