private void AddClients() { if (clientsAddQueue.Count > 0) { lock (clientsAddQueue.SyncRoot) { while (clientsAddQueue.Count > 0) { GameClient client = (GameClient)clientsAddQueue.Dequeue(); clients.Add(client.ConnectionID, client); client.StartConnection(); } } } }