Fix multiprocessing.event to match the new threading.Event API

This commit is contained in:
Jesse Noller 2009-04-01 03:45:50 +00:00
parent a83da3507f
commit 02cb0eb231
3 changed files with 20 additions and 7 deletions

View file

@ -301,5 +301,10 @@ class Event(object):
self._flag.release()
else:
self._cond.wait(timeout)
if self._flag.acquire(False):
self._flag.release()
return True
return False
finally:
self._cond.release()