/// <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(); }
protected override void OnStop() { if (!IsRunning) { return; } _mainThread.Stop(); _sendThread.Stop(); _receThread.Stop(); _stream.Dispose(); _client2Gate.Close(); IsRunning = false; Logger.Trace("game server stopped"); }
public void Stop() { taskThread.Stop(); statusThread.Stop(); sMSSendter.Stop(); }
public void Close() { _thread.Stop(); }