|
@ -179,7 +179,7 @@ class Event(object): |
|
|
if not self.asynchronous: |
|
|
if not self.asynchronous: |
|
|
self.result.append(tuple(r)) |
|
|
self.result.append(tuple(r)) |
|
|
|
|
|
|
|
|
except Exception as err: |
|
|
except Exception: |
|
|
if not self.asynchronous: |
|
|
if not self.asynchronous: |
|
|
self.result.append((False, self._error(sys.exc_info()), |
|
|
self.result.append((False, self._error(sys.exc_info()), |
|
|
handler)) |
|
|
handler)) |
|
@ -190,6 +190,9 @@ class Event(object): |
|
|
if not self.asynchronous: |
|
|
if not self.asynchronous: |
|
|
self.queue.task_done() |
|
|
self.queue.task_done() |
|
|
|
|
|
|
|
|
|
|
|
if self.queue.empty(): |
|
|
|
|
|
raise Queue.Empty |
|
|
|
|
|
|
|
|
except Queue.Empty: |
|
|
except Queue.Empty: |
|
|
break |
|
|
break |
|
|
|
|
|
|
|
@ -268,6 +271,7 @@ class Event(object): |
|
|
finally: |
|
|
finally: |
|
|
lock.release() |
|
|
lock.release() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _timeout(self, timeout, handler, *args, **kwargs): |
|
|
def _timeout(self, timeout, handler, *args, **kwargs): |
|
|
""" Controls the time allocated for the execution of a method """ |
|
|
""" Controls the time allocated for the execution of a method """ |
|
|
t = spawn_thread(target = handler, args = args, kwargs = kwargs) |
|
|
t = spawn_thread(target = handler, args = args, kwargs = kwargs) |