Exemple #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();
        }
Exemple #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");
        }
        /// <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();
 }
Exemple #5
0
 public void Close()
 {
     _thread.Stop();
 }