Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57022 - in sandbox/task/boost: . task
From: oliver.kowalke_at_[hidden]
Date: 2009-10-20 15:45:55


Author: olli
Date: 2009-10-20 15:45:54 EDT (Tue, 20 Oct 2009)
New Revision: 57022
URL: http://svn.boost.org/trac/boost/changeset/57022

Log:
- correction wor waitfor_any() and task.hpp

Text files modified:
   sandbox/task/boost/task.hpp | 1 -
   sandbox/task/boost/task/handle.hpp | 20 ++++++++++----------
   2 files changed, 10 insertions(+), 11 deletions(-)

Modified: sandbox/task/boost/task.hpp
==============================================================================
--- sandbox/task/boost/task.hpp (original)
+++ sandbox/task/boost/task.hpp 2009-10-20 15:45:54 EDT (Tue, 20 Oct 2009)
@@ -16,7 +16,6 @@
 #include <boost/task/bounded_twolock_fifo.hpp>
 #include <boost/task/callable.hpp>
 #include <boost/task/context.hpp>
-#include <boost/task/distrib_rr_ums.hpp>
 #include <boost/task/exceptions.hpp>
 #include <boost/task/future.hpp>
 #include <boost/task/handle.hpp>

Modified: sandbox/task/boost/task/handle.hpp
==============================================================================
--- sandbox/task/boost/task/handle.hpp (original)
+++ sandbox/task/boost/task/handle.hpp 2009-10-20 15:45:54 EDT (Tue, 20 Oct 2009)
@@ -192,17 +192,8 @@
         { throw task_interrupted(); }
 }
 
-template< typename T1, typename T2 >
-unsigned int waitfor_any( handle< T1 > & t1, handle< T2 > & t2)
-{
- try
- { return wait_for_any( t1.get_future(), t2.get_future() ); }
- catch ( thread_interrupted const&)
- { throw task_interrupted(); }
-}
-
 template< typename Iterator >
-Iterator waitfor_any( Iterator begin, Iterator end)
+typename disable_if< is_handle_type< Iterator >, Iterator >::type waitfor_any( Iterator begin, Iterator end)
 {
         try
         {
@@ -215,6 +206,15 @@
         { throw task_interrupted(); }
 }
 
+template< typename T1, typename T2 >
+unsigned int waitfor_any( handle< T1 > & t1, handle< T2 > & t2)
+{
+ try
+ { return wait_for_any( t1.get_future(), t2.get_future() ); }
+ catch ( thread_interrupted const&)
+ { throw task_interrupted(); }
+}
+
 template< typename T1, typename T2, typename T3 >
 unsigned int waitfor_any( handle< T1 > & t1, handle< T2 > & t2, handle< T3 > & t3)
 {


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