Revision 409:f3f1ab73a5ed

View differences:

src/main/java/cz/agents/alite/common/event/EventProcessor.java
1 1
package cz.agents.alite.common.event;
2 2

  
3
import java.util.LinkedList;
4 3
import java.util.List;
5 4
import java.util.PriorityQueue;
6 5
import java.util.Queue;
6
import java.util.concurrent.CopyOnWriteArrayList;
7 7

  
8 8
import org.apache.log4j.Level;
9 9
import org.apache.log4j.Logger;
......
36 36
    private long eventIdCounter = 0;
37 37
    private Thread thread = Thread.currentThread();
38 38
    private final Queue<Event> eventQueue = new PriorityQueue<Event>();
39
    private final List<EventHandler> entityList = new LinkedList<EventHandler>();
39
    private final List<EventHandler> entityList = new CopyOnWriteArrayList<EventHandler>();
40 40

  
41 41
    public void run() {
42 42
        Event event = eventQueue.poll();

Also available in: Unified diff