diff options
author | Jesse Noller <jnoller@gmail.com> | 2009-04-01 03:45:50 (GMT) |
---|---|---|
committer | Jesse Noller <jnoller@gmail.com> | 2009-04-01 03:45:50 (GMT) |
commit | 02cb0eb231fc01e2a50cbe14f6da7a8df52959ef (patch) | |
tree | 48835ed26dd10e33babaf8bbde4f770b898ca0fd /Lib/multiprocessing | |
parent | a83da3507f6f6075cce143cb118d3ddb23df981c (diff) | |
download | cpython-02cb0eb231fc01e2a50cbe14f6da7a8df52959ef.zip cpython-02cb0eb231fc01e2a50cbe14f6da7a8df52959ef.tar.gz cpython-02cb0eb231fc01e2a50cbe14f6da7a8df52959ef.tar.bz2 |
Fix multiprocessing.event to match the new threading.Event API
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/synchronize.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py index dacf45a..716f3c7 100644 --- a/Lib/multiprocessing/synchronize.py +++ b/Lib/multiprocessing/synchronize.py @@ -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() |