diff options
| author | Jesse Noller <jnoller@gmail.com> | 2008-09-01 16:47:25 (GMT) |
|---|---|---|
| committer | Jesse Noller <jnoller@gmail.com> | 2008-09-01 16:47:25 (GMT) |
| commit | 27cc8e1dd2846ff8df18b5d776192d4f99354a26 (patch) | |
| tree | f6b1a93f23b79f699cbda7862089e72f418e18d7 /Lib/multiprocessing/synchronize.py | |
| parent | 34bfda55d23e90a085be95622263aa1f32bc5c27 (diff) | |
| download | cpython-27cc8e1dd2846ff8df18b5d776192d4f99354a26.zip cpython-27cc8e1dd2846ff8df18b5d776192d4f99354a26.tar.gz cpython-27cc8e1dd2846ff8df18b5d776192d4f99354a26.tar.bz2 | |
Submit Nick's patch for issue 3589, reviewed by jnoller
Diffstat (limited to 'Lib/multiprocessing/synchronize.py')
| -rw-r--r-- | Lib/multiprocessing/synchronize.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py index 428656a..3e21dfe 100644 --- a/Lib/multiprocessing/synchronize.py +++ b/Lib/multiprocessing/synchronize.py @@ -65,7 +65,9 @@ class SemLock(object): # class Semaphore(SemLock): - + ''' + A semaphore object + ''' def __init__(self, value=1): SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX) @@ -84,7 +86,9 @@ class Semaphore(SemLock): # class BoundedSemaphore(Semaphore): - + ''' + A bounded semaphore object + ''' def __init__(self, value=1): SemLock.__init__(self, SEMAPHORE, value, value) @@ -101,7 +105,9 @@ class BoundedSemaphore(Semaphore): # class Lock(SemLock): - + ''' + A non-recursive lock object + ''' def __init__(self): SemLock.__init__(self, SEMAPHORE, 1, 1) @@ -126,7 +132,9 @@ class Lock(SemLock): # class RLock(SemLock): - + ''' + A recursive lock object + ''' def __init__(self): SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1) @@ -152,6 +160,9 @@ class RLock(SemLock): # class Condition(object): + ''' + A condition object + ''' def __init__(self, lock=None): self._lock = lock or RLock() @@ -252,7 +263,9 @@ class Condition(object): # class Event(object): - + ''' + An event object + ''' def __init__(self): self._cond = Condition(Lock()) self._flag = Semaphore(0) |
