Rev | Line | |
---|
[88] | 1 | package vnsim.core; |
---|
| 2 | |
---|
| 3 | import vnsim.core.events.Event; |
---|
| 4 | |
---|
| 5 | |
---|
[110] | 6 | |
---|
| 7 | |
---|
[88] | 8 | public class EventProcessingThread implements Runnable { |
---|
| 9 | |
---|
| 10 | final Event e; |
---|
| 11 | final Engine engine; |
---|
| 12 | |
---|
| 13 | |
---|
[110] | 14 | public EventProcessingThread(Engine engine, Event e){ |
---|
[88] | 15 | this.e=e; |
---|
| 16 | this.engine=engine; |
---|
| 17 | |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | public void run() { |
---|
| 21 | //System.out.print("Threadul ruleaza......."); |
---|
| 22 | //System.out.println(">> Thread:"+Thread.currentThread().getName()); |
---|
| 23 | |
---|
| 24 | engine.playEvent(e); |
---|
[110] | 25 | /*synchronized (Engine.eventQueue) { |
---|
| 26 | Engine.cnt++; |
---|
| 27 | }*/ |
---|
[88] | 28 | |
---|
| 29 | //System.out.println("Threadul termina......."); |
---|
| 30 | } |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.