Boost logo

Boost-Commit :

From: Lawrence_at_[hidden]
Date: 2007-12-14 20:49:19


Author: crowl
Date: 2007-12-14 20:49:19 EST (Fri, 14 Dec 2007)
New Revision: 42057
URL: http://svn.boost.org/trac/boost/changeset/42057

Log:
Clarify order of three phases of condition wait.

Text files modified:
   sandbox/committee/LWG/thread_library.html | 22 +++++++++++++++++++++-
   1 files changed, 21 insertions(+), 1 deletions(-)

Modified: sandbox/committee/LWG/thread_library.html
==============================================================================
--- sandbox/committee/LWG/thread_library.html (original)
+++ sandbox/committee/LWG/thread_library.html 2007-12-14 20:49:19 EST (Fri, 14 Dec 2007)
@@ -2835,8 +2835,28 @@
 Condition variables permit concurrent invocation
 of the <code>wait</code>, <code>timed_wait</code>,
 <code>notify_one</code> and <code>notify_all</code> member functions.
+</p>
+
+<p>
+The execution of <code>wait</code> and <code>timed_wait</code>
+is performed in three atomic parts:
+</p>
+
+<ol>
+<li>The release of the mutex, and entry into the waiting state,
+</li>
+<li>The unblocking of the wait, and
+</li>
+<li>the reacquisition of the lock
+</li>
+</ol>
+
+<p>
 The implementation shall behave as though
-they are executed in some unspecified order.
+<code>notify_one</code>, <code>notify_all</code>,
+and each part of
+the <code>wait</code> and <code>timed_wait</code> executions
+are executed in some unspecified total order.
 </p>
 
 <p>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk