[Python-checkins] r88072 - python/branches/py3k/Doc/whatsnew/3.2.rst

raymond.hettinger python-checkins at python.org
Mon Jan 17 22:05:07 CET 2011


Author: raymond.hettinger
Date: Mon Jan 17 22:05:07 2011
New Revision: 88072

Log:
Note that two-phase cyclic barriers are suitable for use in loops.


Modified:
   python/branches/py3k/Doc/whatsnew/3.2.rst

Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Mon Jan 17 22:05:07 2011
@@ -834,8 +834,10 @@
 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


More information about the Python-checkins mailing list