summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-01-17 21:05:07 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-01-17 21:05:07 (GMT)
commit15b47c5d7f8e3fb3021185d00eb9032de824920b (patch)
treed276010753088b832d4a44594f90276f4cbe16b6 /Doc
parent37b9e46a04452274b31db71d75b141af0b48997e (diff)
downloadcpython-15b47c5d7f8e3fb3021185d00eb9032de824920b.zip
cpython-15b47c5d7f8e3fb3021185d00eb9032de824920b.tar.gz
cpython-15b47c5d7f8e3fb3021185d00eb9032de824920b.tar.bz2
Note that two-phase cyclic barriers are suitable for use in loops.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.2.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index e342b87..bdcf588 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -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