This commit is contained in:
who
2007-11-12 11:17:25 +01:00
parent fbb070c940
commit 197d60b102
8 changed files with 256 additions and 212 deletions

19
server/DynHandler.py Normal file
View File

@ -0,0 +1,19 @@
import threading
import Event
class DynHandler(threading.Thread):
def __init__(self, queue):
threading.Thread.__init__(self)
self.q = queue
self.setDaemon(True)
def run(self):
while True:
event = self.q.get()
try:
event.prepare()
print "Processing event %s" % str(event)
event.process()
except Event.IllegalEventException, e:
print "Some failure: %s" % e.msg