Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
15b47c5d
Commit
15b47c5d
authored
Jan 17, 2011
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note that two-phase cyclic barriers are suitable for use in loops.
parent
37b9e46a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.2.rst
+4
-2
No files found.
Doc/whatsnew/3.2.rst
View file @
15b47c5d
...
...
@@ -834,8 +834,10 @@ Barriers can work with an arbitrary number of threads. This is a generalization
of a `Rendezvous <http://en.wikipedia.org/wiki/Synchronous_rendezvous>`_ which
is defined for only two threads.
The barrier is designed to be cyclic, making it reusable once all of the
waiting threads are released.
Implemented as a two-phase cyclic barrier, :class:`~threading.Barrier` objects
are suitable for use in loops. The separate *filling* and *draining* phases
assure that all threads get released (drained) before any one them can loop back
and re-enter the barrier. The barrier fully resets after each cycle.
If any of the predecessor tasks can hang or be delayed, a barrier can be created
with an optional *timeout* parameter. Then if the timeout period elapses before
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment