Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2007-12-03 17:00:26


Author: anthonyw
Date: 2007-12-03 17:00:26 EST (Mon, 03 Dec 2007)
New Revision: 41668
URL: http://svn.boost.org/trac/boost/changeset/41668

Log:
check predicate before returning if we time out on a predicated version of timed_wait
Text files modified:
   trunk/boost/thread/pthread/condition_variable.hpp | 2 +-
   trunk/boost/thread/pthread/condition_variable_fwd.hpp | 2 +-
   trunk/boost/thread/win32/condition_variable.hpp | 2 +-
   3 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/thread/pthread/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable.hpp 2007-12-03 17:00:26 EST (Mon, 03 Dec 2007)
@@ -143,7 +143,7 @@
             while (!pred())
             {
                 if(!timed_wait(m, wait_until))
- return false;
+ return pred();
             }
             return true;
         }

Modified: trunk/boost/thread/pthread/condition_variable_fwd.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable_fwd.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable_fwd.hpp 2007-12-03 17:00:26 EST (Mon, 03 Dec 2007)
@@ -41,7 +41,7 @@
             while (!pred())
             {
                 if(!timed_wait(m, wait_until))
- return false;
+ return pred();
             }
             return true;
         }

Modified: trunk/boost/thread/win32/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/win32/condition_variable.hpp (original)
+++ trunk/boost/thread/win32/condition_variable.hpp 2007-12-03 17:00:26 EST (Mon, 03 Dec 2007)
@@ -186,7 +186,7 @@
                 while (!pred())
                 {
                     if(!do_wait(m, wait_until))
- return false;
+ return pred();
                 }
                 return true;
             }


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