summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/__init__.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-06-15 17:26:07 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2012-06-15 17:26:07 (GMT)
commit3730a17a58d9058b0880202050a8c1e4ea193e8f (patch)
tree4dcc6136ee97567e2a9098e10865bff76929823b /Lib/multiprocessing/__init__.py
parenta6bc4b4c85dff9ccd0f91a1e10ac107e59c487a5 (diff)
downloadcpython-3730a17a58d9058b0880202050a8c1e4ea193e8f.zip
cpython-3730a17a58d9058b0880202050a8c1e4ea193e8f.tar.gz
cpython-3730a17a58d9058b0880202050a8c1e4ea193e8f.tar.bz2
Issue #14059: Implement multiprocessing.Barrier
Diffstat (limited to 'Lib/multiprocessing/__init__.py')
-rw-r--r--Lib/multiprocessing/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/multiprocessing/__init__.py b/Lib/multiprocessing/__init__.py
index 02460f0..1f3e67c 100644
--- a/Lib/multiprocessing/__init__.py
+++ b/Lib/multiprocessing/__init__.py
@@ -23,8 +23,8 @@ __all__ = [
'Manager', 'Pipe', 'cpu_count', 'log_to_stderr', 'get_logger',
'allow_connection_pickling', 'BufferTooShort', 'TimeoutError',
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition',
- 'Event', 'Queue', 'SimpleQueue', 'JoinableQueue', 'Pool', 'Value', 'Array',
- 'RawValue', 'RawArray', 'SUBDEBUG', 'SUBWARNING',
+ 'Event', 'Barrier', 'Queue', 'SimpleQueue', 'JoinableQueue', 'Pool',
+ 'Value', 'Array', 'RawValue', 'RawArray', 'SUBDEBUG', 'SUBWARNING',
]
__author__ = 'R. Oudkerk (r.m.oudkerk@gmail.com)'
@@ -186,6 +186,13 @@ def Event():
from multiprocessing.synchronize import Event
return Event()
+def Barrier(parties, action=None, timeout=None):
+ '''
+ Returns a barrier object
+ '''
+ from multiprocessing.synchronize import Barrier
+ return Barrier(parties, action, timeout)
+
def Queue(maxsize=0):
'''
Returns a queue object