Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51183 - sandbox/interthreads/boost/interthreads
From: vicente.botet_at_[hidden]
Date: 2009-02-10 10:33:43


Author: viboes
Date: 2009-02-10 10:33:42 EST (Tue, 10 Feb 2009)
New Revision: 51183
URL: http://svn.boost.org/trac/boost/changeset/51183

Log:
interthreads version 0.4.1
    * Adding 4 parameters to wait_for_all

Text files modified:
   sandbox/interthreads/boost/interthreads/wait_for_all.hpp | 25 +++++++++++++++++++++++++
   1 files changed, 25 insertions(+), 0 deletions(-)

Modified: sandbox/interthreads/boost/interthreads/wait_for_all.hpp
==============================================================================
--- sandbox/interthreads/boost/interthreads/wait_for_all.hpp (original)
+++ sandbox/interthreads/boost/interthreads/wait_for_all.hpp 2009-02-10 10:33:42 EST (Tue, 10 Feb 2009)
@@ -50,6 +50,15 @@
             typename boost::result_of<F3()>::type
> type;
     };
+ template <typename L, typename F1, typename F2, typename F3, typename F4>
+ struct wait_for_all<L, fusion::tuple<F1,F2,F3,F4> > {
+ typedef fusion::tuple<
+ typename boost::result_of<F1()>::type,
+ typename boost::result_of<F2()>::type,
+ typename boost::result_of<F3()>::type,
+ typename boost::result_of<F4()>::type
+ > type;
+ };
 
 }
 
@@ -111,6 +120,22 @@
         fusion::at_c<0>(values), fusion::at_c<1>(values), f3());
     #endif
 }
+template< typename AE, typename F1, typename F2, typename F3, typename F4>
+typename result_of::wait_for_all<AE, fusion::tuple<F1,F2,F3,F4> >::type
+wait_for_all( AE& ae, F1 f1, F2 f2 , F3 f3, F4 f4 ) {
+ #if 1
+ typename result_of::fork_all<AE, fusion::tuple<F1,F2,F3> >::type handles(fork_all(ae, f1, f2, f3, f4));
+ typename result_of::wait_for_all<AE, fusion::tuple<F1,F2,F3> >::type values;
+ set_all(handles,values);
+ return values;
+ #else
+ typename result_of::fork_all<AE, fusion::tuple<F1, F2> >::type handles(fork_all(ae, f1, f2, f3));
+ typename result_of::wait_for_all<AE, fusion::tuple<F1, F2> >::type values;
+ set_all(handles,values);
+ return typename result_of::wait_for_all<AE, fusion::tuple<F1,F2, F3, F4> >::type(
+ fusion::at_c<0>(values), fusion::at_c<1>(values), fusion::at_c<2>(values), f4());
+ #endif
+}
 
 }
 }


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