Threads configuration.
This commit is contained in:
@@ -12,11 +12,11 @@ import com.gempukku.polling.WaitingRequest;
|
||||
import java.util.*;
|
||||
|
||||
public class GameCommunicationChannel implements GameStateListener, LongPollableResource {
|
||||
private List<GameEvent> _events = new LinkedList<GameEvent>();
|
||||
private List<GameEvent> _events = Collections.synchronizedList(new LinkedList<GameEvent>());
|
||||
private String _self;
|
||||
private long _lastConsumed = System.currentTimeMillis();
|
||||
private int _channelNumber;
|
||||
private WaitingRequest _waitingRequest;
|
||||
private volatile WaitingRequest _waitingRequest;
|
||||
|
||||
public GameCommunicationChannel(String self, int channelNumber) {
|
||||
_self = self;
|
||||
@@ -190,7 +190,7 @@ public class GameCommunicationChannel implements GameStateListener, LongPollable
|
||||
public List<GameEvent> consumeGameEvents() {
|
||||
updateLastAccess();
|
||||
List<GameEvent> result = _events;
|
||||
_events = new LinkedList<GameEvent>();
|
||||
_events = Collections.synchronizedList(new LinkedList<GameEvent>());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ public class DraftCommunicationChannel implements LongPollableResource {
|
||||
private int _channelNumber;
|
||||
private long _lastAccessed;
|
||||
|
||||
private boolean _changed;
|
||||
private String _cardChoiceOnClient;
|
||||
private WaitingRequest _waitingRequest;
|
||||
private volatile boolean _changed;
|
||||
private volatile WaitingRequest _waitingRequest;
|
||||
|
||||
public DraftCommunicationChannel(int channelNumber) {
|
||||
_channelNumber = channelNumber;
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
public class ChatCommunicationChannel implements ChatRoomListener, LongPollableResource {
|
||||
private List<ChatMessage> _messages = new LinkedList<ChatMessage>();
|
||||
private long _lastConsumed = System.currentTimeMillis();
|
||||
private WaitingRequest _waitingRequest;
|
||||
private volatile WaitingRequest _waitingRequest;
|
||||
|
||||
@Override
|
||||
public synchronized void deregisterRequest(WaitingRequest waitingRequest) {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class HallCommunicationChannel implements LongPollableResource {
|
||||
private Map<String, Map<String, String>> _tablePropsOnClient = new LinkedHashMap<String, Map<String, String>>();
|
||||
private Set<String> _playedGames = new HashSet<String>();
|
||||
private volatile boolean _changed;
|
||||
private WaitingRequest _waitingRequest;
|
||||
private volatile WaitingRequest _waitingRequest;
|
||||
|
||||
public HallCommunicationChannel(int channelNumber) {
|
||||
_channelNumber = channelNumber;
|
||||
|
||||
Reference in New Issue
Block a user