sequential event processing via executorservice
问题 I have an event queue to process. A thread adds events to the queue. I have created a runnable Task that in the run method does all which is necessary to process the event. I have declared an Executors.newCachedThreadPool(); and I execute each Task. public class EventHandler { private static final ExecutorService handlers = Executors.newCachedThreadPool(); public void handleNextEvent(AnEvent event){ handlers.execute(new Task(evt)); } public class Task implements Runnable{ @Override public