Thread-safe list?

master
sigonasr2 2 years ago
parent 7c820982f8
commit e589001985
  1. 3
      sig/App.java

@ -292,7 +292,7 @@ class Server
} }
} }
Collection<String>commandQueue=Collections.synchronizedCollection(new ArrayList<>()); List<String>commandQueue=Collections.synchronizedList(new ArrayList<>());
// constructor with port // constructor with port
public Server(int port) public Server(int port)
@ -454,6 +454,7 @@ class Server
} }
} }
} }
commandQueue.clear();
if (queueUpSprint&&nextActionTimer==0){ if (queueUpSprint&&nextActionTimer==0){
PressKey(KeyEvent.VK_N); PressKey(KeyEvent.VK_N);

Loading…
Cancel
Save