|
Boost-Commit : |
From: hinnant_at_[hidden]
Date: 2007-11-26 12:44:26
Author: hinnant
Date: 2007-11-26 12:44:25 EST (Mon, 26 Nov 2007)
New Revision: 41403
URL: http://svn.boost.org/trac/boost/changeset/41403
Log:
fixed timed_wait example
Text files modified:
sandbox/committee/LWG/thread_library.html | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Modified: sandbox/committee/LWG/thread_library.html
==============================================================================
--- sandbox/committee/LWG/thread_library.html (original)
+++ sandbox/committee/LWG/thread_library.html 2007-11-26 12:44:25 EST (Mon, 26 Nov 2007)
@@ -2381,8 +2381,9 @@
condition_variable cv;
...
system_time abs_time = get_system_time() + seconds(1);
- while (!pred())
- cv.timed_wait(mut, abs_time);
+ bool within_time = true;
+ while (within_time && !pred())
+ within_time = cv.timed_wait(mut, abs_time);
if (pred()) ...</pre>
<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