Boost logo

Boost-Commit :

From: Lawrence_at_[hidden]
Date: 2007-12-06 16:35:30


Author: crowl
Date: 2007-12-06 16:35:29 EST (Thu, 06 Dec 2007)
New Revision: 41806
URL: http://svn.boost.org/trac/boost/changeset/41806

Log:
Condition variable Effects and Returns reformatting.

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

Modified: sandbox/committee/LWG/thread_library.html
==============================================================================
--- sandbox/committee/LWG/thread_library.html (original)
+++ sandbox/committee/LWG/thread_library.html 2007-12-06 16:35:29 EST (Thu, 06 Dec 2007)
@@ -2876,15 +2876,15 @@
 <dt>Effects:</dt>
 <dd>
 <p>
-While <code><var>pred</var>()</code> returns <code>false</code>,
-calls <code>wait(<var>lock</var>)</code>.
+As if:
 </p>
 
-<p>
-[<i>Note:</i>
-Does not block if <code><var>pred</var>()</code> is initially <code>true</code>.
-&mdash;<i>end note</i>]
-</p>
+<blockquote>
+<pre><code>
+while (!pred())
+ wait(lock);
+</code></pre>
+</blockquote>
 </dd>
 </dl>
 </blockquote>
@@ -2970,7 +2970,15 @@
 <dl>
 <dt>Effects:</dt>
 <dd>
-As if returns <code>timed_wait(<var>lock</var>, get_current_time() + <var>rel_time</var>)</code>.
+<p>
+As if:
+</p>
+
+<blockquote>
+<pre><code>
+timed_wait(<var>lock</var>, get_current_time() + <var>rel_time</var>)
+</code></pre>
+</blockquote>
 </dd>
 
 <dt>Returns:</dt>
@@ -3013,9 +3021,6 @@
 
 <p>
 [<i>Note:</i>
-There is no blocking
-if <code><var>pred</var>()</code> is initially <code>true</code>,
-even if the timeout has already expired.
 The return value indicates whether the predicate evaluates to <code>true</code>,
 regardless of whether the timeout was triggered.
 &mdash;<i>end note</i>]
@@ -3038,9 +3043,18 @@
 </p>
 
 <blockquote>
-<pre><code>return timed_wait(<var>lock</var>, get_system_time() + <var>rel_time</var>, std::move(<var>pred</var>));
+<pre><code>
+timed_wait(<var>lock</var>, get_system_time() + <var>rel_time</var>, std::move(<var>pred</var>))
 </code></pre>
 </blockquote>
+
+<p>
+[<i>Note:</i>
+There is no blocking
+if <code><var>pred</var>()</code> is initially <code>true</code>,
+even if the timeout has already expired.
+&mdash;<i>end note</i>]
+</p>
 </dd>
 
 <dt>Returns:</dt>
@@ -3051,9 +3065,6 @@
 
 <p>
 [<i>Note:</i>
-There is no blocking
-if <code><var>pred</var>()</code> is initially <code>true</code>,
-even if the timeout has already expired.
 The return value indicates whether the predicate evaluates to <code>true</code>,
 regardless of whether the timeout was triggered.
 &mdash;<i>end note</i>]
@@ -3246,16 +3257,15 @@
 <dt>Effects:</dt>
 <dd>
 <p>
-While <code><var>pred</var>()</code> returns <code>false</code>,
-calls <code>wait(<var>lock</var>)</code>.
+As if:
 </p>
 
-<p>
-[<i>Note:</i>
-There is no blocking
-if <code><var>pred</var>()</code> is initially <code>true</code>.
-&mdash;<i>end note</i>]
-</p>
+<blockquote>
+<pre><code>
+while (!pred())
+ wait(lock);
+</code></pre>
+</blockquote>
 </dd>
 </dl>
 </blockquote>
@@ -3320,7 +3330,14 @@
 <dl>
 <dt>Effects:</dt>
 <dd>
-As if returns <code>timed_wait(<var>lock</var>, get_current_time() + <var>rel_time</var>)</code>.
+<p>
+As if:
+</p>
+<blockquote>
+<pre><code>
+timed_wait(<var>lock</var>, get_current_time() + <var>rel_time</var>)
+</code></pre>
+</blockquote>
 </dd>
 
 <dt>Returns:</dt>
@@ -3363,9 +3380,6 @@
 </p>
 <p>
 [<i>Note:</i>
-There is no blocking
-if <code><var>pred</var>()</code> is initially <code>true</code>,
-even if the timeout has already expired.
 The return value indicates whether the predicate evaluates to <code>true</code>,
 regardless of whether the timeout was triggered.
 &mdash;<i>end note</i>]
@@ -3390,9 +3404,17 @@
 
 <blockquote>
 <pre><code>
-return timed_wait(<var>lock</var>, get_system_time() + <var>rel_time</var>, std::move(<var>pred</var>));
+timed_wait(<var>lock</var>, get_system_time() + <var>rel_time</var>, std::move(<var>pred</var>))
 </code></pre>
 </blockquote>
+
+<p>
+[<i>Note:</i>
+There is no blocking
+if <code><var>pred</var>()</code> is initially <code>true</code>,
+even if the timeout has already expired.
+&mdash;<i>end note</i>]
+</p>
 </dd>
 
 <dt>Returns:</dt>
@@ -3403,9 +3425,6 @@
 
 <p>
 [<i>Note:</i>
-There is no blocking
-if <code><var>pred</var>()</code> is initially <code>true</code>,
-even if the timeout has already expired.
 The return value indicates whether the predicate
 evaluates to <code>true</code>,
 regardless of whether the timeout was triggered.


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