Moving command execution to a single thread executor. I leave it up to end-users now if they want event processing to be multi-threaded.

This commit is contained in:
Manevolent
2018-09-06 11:49:51 -04:00
parent b7282cc337
commit 15f7485fa9
@@ -41,7 +41,7 @@ public class LocalTeamspeakClientSocket
private final DatagramPacket packet = new DatagramPacket(new byte[500], 500); private final DatagramPacket packet = new DatagramPacket(new byte[500], 500);
private final Map<String, CommandProcessor> namedProcessors = new HashMap<>(); private final Map<String, CommandProcessor> namedProcessors = new HashMap<>();
private final ExecutorService commandExecutionService = Executors.newCachedThreadPool(); private final ExecutorService commandExecutionService = Executors.newSingleThreadExecutor();
private final Object commandSendLock = new Object(); private final Object commandSendLock = new Object();
private volatile InetSocketAddress remote; private volatile InetSocketAddress remote;