Line | |
---|
1 | package vnsim.core; |
---|
2 | |
---|
3 | import vnsim.core.events.Event; |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | public class EventProcessingThread implements Runnable { |
---|
9 | |
---|
10 | final Event e; |
---|
11 | final Engine engine; |
---|
12 | |
---|
13 | |
---|
14 | public EventProcessingThread(Engine engine, Event e){ |
---|
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); |
---|
25 | /*synchronized (Engine.eventQueue) { |
---|
26 | Engine.cnt++; |
---|
27 | }*/ |
---|
28 | |
---|
29 | //System.out.println("Threadul termina......."); |
---|
30 | } |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.