|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82297 - trunk/libs/thread/doc
From: vicente.botet_at_[hidden]
Date: 2012-12-31 05:02:14
Author: viboes
Date: 2012-12-31 05:02:13 EST (Mon, 31 Dec 2012)
New Revision: 82297
URL: http://svn.boost.org/trac/boost/changeset/82297
Log:
Thread: wait_for description
Text files modified:
trunk/libs/thread/doc/condition_variables.qbk | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
Modified: trunk/libs/thread/doc/condition_variables.qbk
==============================================================================
--- trunk/libs/thread/doc/condition_variables.qbk (original)
+++ trunk/libs/thread/doc/condition_variables.qbk 2012-12-31 05:02:13 EST (Mon, 31 Dec 2012)
@@ -419,14 +419,7 @@
[variablelist
[[Effects:] [As-if ``
-while(!pred())
-{
- if(!wait_for(lock,rel_time))
- {
- return pred();
- }
-}
-return true;
+return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
``]]
]
@@ -731,19 +724,12 @@
[endsect]
-[section:wait_for_predicate `template <class lock_type, class Rep, class Period, class Predicate> bool wait_until(lock_type& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred)`]
+[section:wait_for_predicate `template <class lock_type, class Rep, class Period, class Predicate> bool wait_for(lock_type& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred)`]
[variablelist
[[Effects:] [As-if ``
-while(!pred())
-{
- if(!__cvany_wait_for(lock,rel_time))
- {
- return pred();
- }
-}
-return true;
+return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
``]]
]
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