|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51215 - sandbox/interthreads/boost/interthreads
From: vicente.botet_at_[hidden]
Date: 2009-02-12 07:52:53
Author: viboes
Date: 2009-02-12 07:52:53 EST (Thu, 12 Feb 2009)
New Revision: 51215
URL: http://svn.boost.org/trac/boost/changeset/51215
Log:
interthreads version 0.4.1
* Adding partial specialization for unique_future
Text files modified:
sandbox/interthreads/boost/interthreads/launcher.hpp | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
Modified: sandbox/interthreads/boost/interthreads/launcher.hpp
==============================================================================
--- sandbox/interthreads/boost/interthreads/launcher.hpp (original)
+++ sandbox/interthreads/boost/interthreads/launcher.hpp 2009-02-12 07:52:53 EST (Thu, 12 Feb 2009)
@@ -135,30 +135,60 @@
namespace partial_specialization_workaround {
template <typename R>
+ struct join<unique_future<R> > {
+ static typename result_of::template join<unique_future<R> >::type apply( unique_future<R>& act) {
+ return act.wait();
+ }
+ };
+ template <typename R>
struct join<shared_future<R> > {
static typename result_of::template join<shared_future<R> >::type apply( shared_future<R>& act) {
return act.wait();
}
};
template <typename R>
+ struct join_until<unique_future<R> > {
+ static typename result_of::template join_until<unique_future<R> >::type apply( unique_future<R>& act, const system_time& abs_time ) {
+ return act.timed_wait_until(abs_time);
+ }
+ };
+ template <typename R>
struct join_until<shared_future<R> > {
static typename result_of::template join_until<shared_future<R> >::type apply( shared_future<R>& act, const system_time& abs_time ) {
return act.timed_wait_until(abs_time);
}
};
template <typename R, typename Duration>
+ struct join_for<unique_future<R>, Duration> {
+ static typename result_of::template join_for<unique_future<R>,Duration>::type apply( unique_future<R>& act, Duration rel_time ) {
+ return act.timed_wait(rel_time);
+ }
+ };
+ template <typename R, typename Duration>
struct join_for<shared_future<R>, Duration> {
static typename result_of::template join_for<shared_future<R>,Duration>::type apply( shared_future<R>& act, Duration rel_time ) {
return act.timed_wait(rel_time);
}
};
template <typename R>
+ struct wait_until<unique_future<R> > {
+ static typename result_of::template wait_until<unique_future<R> >::type apply( unique_future<R>& act, const system_time& abs_time ) {
+ return act.timed_wait_until(abs_time);
+ }
+ };
+ template <typename R>
struct wait_until<shared_future<R> > {
static typename result_of::template wait_until<shared_future<R> >::type apply( shared_future<R>& act, const system_time& abs_time ) {
return act.timed_wait_until(abs_time);
}
};
template <typename R, typename Duration>
+ struct wait_for<unique_future<R>, Duration> {
+ static typename result_of::template wait_for<unique_future<R>,Duration>::type apply( unique_future<R>& act, Duration rel_time ) {
+ return act.timed_wait(rel_time);
+ }
+ };
+ template <typename R, typename Duration>
struct wait_for<shared_future<R>, Duration> {
static typename result_of::template wait_for<shared_future<R>,Duration>::type apply( shared_future<R>& act, Duration rel_time ) {
return act.timed_wait(rel_time);
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