Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53227 - in sandbox/async: boost/async libs/async/doc libs/async/test
From: vicente.botet_at_[hidden]
Date: 2009-05-24 11:21:51


Author: viboes
Date: 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
New Revision: 53227
URL: http://svn.boost.org/trac/boost/changeset/53227

Log:
Boost.Async V0.2: Immediate executor + reference docs
Added:
   sandbox/async/boost/async/immediate.hpp (contents, props changed)
   sandbox/async/libs/async/doc/acknowledgments.qbk (contents, props changed)
   sandbox/async/libs/async/test/test_immediate.cpp (contents, props changed)
Removed:
   sandbox/async/libs/async/doc/acknowledgements.qbk
Text files modified:
   sandbox/async/boost/async/future_traits.hpp | 309 +++++++++++++++++++++++++--------------
   sandbox/async/boost/async/launcher.hpp | 81 ----------
   sandbox/async/libs/async/doc/appendices.qbk | 4
   sandbox/async/libs/async/doc/async.qbk | 2
   sandbox/async/libs/async/doc/case_studies.qbk | 2
   sandbox/async/libs/async/doc/changes.qbk | 14 +
   sandbox/async/libs/async/doc/concepts.qbk | 38 ++--
   sandbox/async/libs/async/doc/concepts_intrinsics.qbk | 14
   sandbox/async/libs/async/doc/installation.qbk | 2
   sandbox/async/libs/async/doc/introduction.qbk | 23 +-
   sandbox/async/libs/async/doc/models.qbk | 6
   sandbox/async/libs/async/doc/overview.qbk | 11
   sandbox/async/libs/async/doc/reference.qbk | 2
   sandbox/async/libs/async/doc/users_guide.qbk | 6
   sandbox/async/libs/async/test/Jamfile.v2 | 1
   15 files changed, 269 insertions(+), 246 deletions(-)

Modified: sandbox/async/boost/async/future_traits.hpp
==============================================================================
--- sandbox/async/boost/async/future_traits.hpp (original)
+++ sandbox/async/boost/async/future_traits.hpp 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -16,9 +16,7 @@
 
 #include <boost/async/act_traits.hpp>
 #include <boost/thread/detail/move.hpp>
-//#include <boost/thread/thread.hpp>
 #include <boost/futures/future.hpp>
-//#include <boost/utility/result_of.hpp>
 #include <boost/type_traits/is_fundamental.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/mpl/if.hpp>
@@ -26,146 +24,239 @@
 #include <boost/config/abi_prefix.hpp>
 
 
-namespace boost {
-namespace async {
+namespace boost { namespace async {
 
- template<typename T>
- struct act_traits<unique_future<T> >
- {
- typedef boost::scoped_ptr<T> storage_type;
+ template<typename T>
+ struct act_traits<unique_future<T> >
+ {
 #ifdef BOOST_HAS_RVALUE_REFS
- typedef T const& source_reference_type;
- struct dummy;
- typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
- typedef typename boost::mpl::if_<boost::is_fundamental<T>,T,T&&>::type move_dest_type;
+ typedef typename boost::mpl::if_<boost::is_fundamental<T>,T,T&&>::type move_dest_type;
 #else
- typedef T& source_reference_type;
- typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T const&>::type rvalue_source_type;
- typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T>::type move_dest_type;
+ typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T>::type move_dest_type;
 #endif
 
- static void init(storage_type& storage,source_reference_type t)
- {
- storage.reset(new T(t));
- }
+#if 0
+ typedef boost::scoped_ptr<T> storage_type;
+#ifdef BOOST_HAS_RVALUE_REFS
+ typedef T const& source_reference_type;
+ struct dummy;
+ typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
+#else
+ typedef T& source_reference_type;
+ typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T const&>::type rvalue_source_type;
+#endif
+ static void init(storage_type& storage,source_reference_type t)
+ {
+ storage.reset(new T(t));
+ }
 
- static void init(storage_type& storage,rvalue_source_type t)
- {
- storage.reset(new T(static_cast<rvalue_source_type>(t)));
- }
+ static void init(storage_type& storage,rvalue_source_type t)
+ {
+ storage.reset(new T(static_cast<rvalue_source_type>(t)));
+ }
 
- static void cleanup(storage_type& storage)
- {
- storage.reset();
- }
- };
+ static void cleanup(storage_type& storage)
+ {
+ storage.reset();
+ }
+#endif
+ };
 
- template<typename T>
- struct act_traits<unique_future<T&> >
+ template<typename T>
+ struct act_traits<unique_future<T&> >
+ {
+ typedef T& move_dest_type;
+#if 0
+ typedef T* storage_type;
+ typedef T& source_reference_type;
+ struct rvalue_source_type {};
+
+ static void init(storage_type& storage,T& t)
         {
- typedef T* storage_type;
- typedef T& source_reference_type;
- struct rvalue_source_type
- {};
- typedef T& move_dest_type;
+ storage=&t;
+ }
 
- static void init(storage_type& storage,T& t)
- {
- storage=&t;
- }
+ static void cleanup(storage_type& storage)
+ {
+ storage=0;
+ }
+#endif
+ };
 
- static void cleanup(storage_type& storage)
- {
- storage=0;
- }
- };
+ template<>
+ struct act_traits<unique_future<void> >
+ {
+ typedef void move_dest_type;
 
- template<>
- struct act_traits<unique_future<void> >
+#if 0
+ typedef bool storage_type;
+ static void init(storage_type& storage)
         {
- typedef bool storage_type;
- typedef void move_dest_type;
+ storage=true;
+ }
 
- static void init(storage_type& storage)
- {
- storage=true;
- }
+ static void cleanup(storage_type& storage)
+ {
+ storage=false;
+ }
 
- static void cleanup(storage_type& storage)
- {
- storage=false;
- }
+#endif
+ };
 
- };
+ template<typename T>
+ struct act_traits<shared_future<T> >
+ {
+ typedef T move_dest_type;
 
- template<typename T>
- struct act_traits<shared_future<T> >
- {
- typedef boost::scoped_ptr<T> storage_type;
+#if 0
+ typedef boost::scoped_ptr<T> storage_type;
 #ifdef BOOST_HAS_RVALUE_REFS
- typedef T const& source_reference_type;
- struct dummy;
- typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
+ typedef T const& source_reference_type;
+ struct dummy;
+ typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
 #else
- typedef T& source_reference_type;
- typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T const&>::type rvalue_source_type;
+ typedef T& source_reference_type;
+ typedef typename boost::mpl::if_<boost::is_convertible<T&,boost::detail::thread_move_t<T> >,boost::detail::thread_move_t<T>,T const&>::type rvalue_source_type;
 #endif
- //typedef const T& move_dest_type;
- typedef T move_dest_type;
+ static void init(storage_type& storage,source_reference_type t)
+ {
+ storage.reset(new T(t));
+ }
 
- static void init(storage_type& storage,source_reference_type t)
- {
- storage.reset(new T(t));
- }
+ static void init(storage_type& storage,rvalue_source_type t)
+ {
+ storage.reset(new T(static_cast<rvalue_source_type>(t)));
+ }
 
- static void init(storage_type& storage,rvalue_source_type t)
- {
- storage.reset(new T(static_cast<rvalue_source_type>(t)));
- }
+ static void cleanup(storage_type& storage)
+ {
+ storage.reset();
+ }
+#endif
+ };
 
- static void cleanup(storage_type& storage)
- {
- storage.reset();
- }
- };
+ template<typename T>
+ struct act_traits<shared_future<T&> >
+ {
+ typedef T& move_dest_type;
+
+#if 0
+ typedef T* storage_type;
+ typedef T& source_reference_type;
+ struct rvalue_source_type {};
+ static void init(storage_type& storage,T& t)
+ {
+ storage=&t;
+ }
 
- template<typename T>
- struct act_traits<shared_future<T&> >
+ static void cleanup(storage_type& storage)
         {
- typedef T* storage_type;
- typedef T& source_reference_type;
- struct rvalue_source_type
- {};
- typedef T& move_dest_type;
+ storage=0;
+ }
+#endif
+ };
 
- static void init(storage_type& storage,T& t)
- {
- storage=&t;
- }
+ template<>
+ struct act_traits<shared_future<void> >
+ {
+ typedef void move_dest_type;
 
- static void cleanup(storage_type& storage)
- {
- storage=0;
- }
- };
+#if 0
+ typedef bool storage_type;
+ static void init(storage_type& storage)
+ {
+ storage=true;
+ }
 
- template<>
- struct act_traits<shared_future<void> >
+ static void cleanup(storage_type& storage)
         {
- typedef bool storage_type;
- typedef void move_dest_type;
+ storage=false;
+ }
+#endif
 
- static void init(storage_type& storage)
- {
- storage=true;
- }
+ };
 
- static void cleanup(storage_type& storage)
- {
- storage=false;
- }
+ template <typename R>
+ struct is_movable<unique_future<R> > : mpl::true_{};
+
+ template <typename R>
+ struct has_future_if<unique_future<R> > : mpl::true_{};
 
+ template <typename R>
+ struct has_thread_if<unique_future<R> > : mpl::false_{};
+
+
+ template <typename R>
+ struct is_movable<shared_future<R> > : mpl::true_{};
+
+ template <typename R>
+ struct has_future_if<shared_future<R> > : mpl::true_{};
+
+ template <typename R>
+ struct has_thread_if<shared_future<R> > : mpl::true_{};
+
+ 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);
+ }
         };
+ }
 
 }
 }

Added: sandbox/async/boost/async/immediate.hpp
==============================================================================
--- (empty file)
+++ sandbox/async/boost/async/immediate.hpp 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -0,0 +1,112 @@
+#ifndef BOOST_ASYNC_IMMEDIATE__HPP
+#define BOOST_ASYNC_IMMEDIATE__HPP
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008-2009.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// Based on the threader/joiner design from of Kevlin Henney (n1883)
+//
+// See http://www.boost.org/libs/async for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include <boost/thread/detail/move.hpp>
+#include <boost/futures/future.hpp>
+#include <boost/utility/result_of.hpp>
+
+#include <boost/async/algorithm.hpp>
+#include <boost/async/act_traits.hpp>
+#include <boost/async/future_traits.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+
+namespace boost {
+namespace async {
+
+class unique_immediate {
+public:
+ template <typename T>
+ struct handle {
+ typedef unique_future<T> type;
+ };
+
+ template <typename F>
+ unique_future<typename boost::result_of<F()>::type>
+ fork(F f) {
+ typedef typename boost::result_of<F()>::type result_type;
+#if 0
+ promise<result_type> prom;
+ unique_future<result_type> act;
+ act=prom.get_future();
+ prom.set_value(f());
+#else
+ packaged_task<result_type> tsk(f);
+ unique_future<result_type> act(tsk.get_future());
+ tsk();
+#endif
+ return boost::move(act);
+ }
+
+};
+
+
+class shared_immediate {
+public:
+ template <typename T>
+ struct handle {
+ typedef shared_future<T> type;
+ };
+
+ template <typename F>
+ shared_future<typename boost::result_of<F()>::type>
+ fork(F f) {
+ typedef typename boost::result_of<F()>::type result_type;
+#if 0
+ promise<result_type> prom;
+ shared_future<result_type> act;
+ act=prom.get_future();
+ prom.set_value(f());
+#else
+ packaged_task<result_type> tsk(f);
+ shared_future<result_type> act(tsk.get_future());
+ tsk();
+#endif
+ return act;
+ }
+
+};
+
+template <>
+struct get_future<unique_immediate> {
+ template <typename T>
+ struct future_type {
+ typedef unique_future<T> type;
+ };
+ template <typename T>
+ unique_future<T>& operator()(unique_future<T>& f) { return f; }
+};
+
+template <>
+struct get_future<shared_immediate> {
+ template <typename T>
+ struct future_type {
+ typedef shared_future<T> type;
+ };
+ template <typename T>
+ shared_future<T>& operator()(shared_future<T>& f) { return f; }
+};
+
+
+}
+}
+
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
+

Modified: sandbox/async/boost/async/launcher.hpp
==============================================================================
--- sandbox/async/boost/async/launcher.hpp (original)
+++ sandbox/async/boost/async/launcher.hpp 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -114,87 +114,6 @@
     shared_future<T>& operator()(shared_future<T>& f) { return f; }
 };
 
-template <typename R>
-struct is_movable<unique_future<R> > : mpl::true_{};
-
-template <typename R>
-struct has_future_if<unique_future<R> > : mpl::true_{};
-
-template <typename R>
-struct has_thread_if<unique_future<R> > : mpl::false_{};
-
-
-template <typename R>
-struct is_movable<shared_future<R> > : mpl::true_{};
-
-template <typename R>
-struct has_future_if<shared_future<R> > : mpl::true_{};
-
-template <typename R>
-struct has_thread_if<shared_future<R> > : mpl::true_{};
-
- 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);
- }
- };
- }
 
 
 }

Deleted: sandbox/async/libs/async/doc/acknowledgements.qbk
==============================================================================
--- sandbox/async/libs/async/doc/acknowledgements.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
+++ (empty file)
@@ -1,15 +0,0 @@
-[/
- (C) Copyright 2008-2009 Vicente J Botet Escriba.
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt).
-]
-
-[section:acknowledgements Appendix D: Acknowledgments]
-
-The Threader|Joiner design has been taken from [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf N1833 - Preliminary Threading Library Proposal for TR2]
-Many thanks to Kevlin Henney to make evident to me the separation between asynchonous executors, and asynchronous completion tokens.
-
-You can help me to make this library better! Any feedback is very welcome.
-
-[endsect]

Added: sandbox/async/libs/async/doc/acknowledgments.qbk
==============================================================================
--- (empty file)
+++ sandbox/async/libs/async/doc/acknowledgments.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -0,0 +1,16 @@
+[/
+ (C) Copyright 2008-2009 Vicente J Botet Escriba.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
+[section:acknowledgments Appendix D: Acknowledgments]
+
+The Threader|Joiner design has been taken from [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf N1833 - Preliminary Threading Library Proposal for TR2]
+Many thanks to Kevlin Henney to make evident to me the separation between asynchronous executors, and asynchronous completion tokens.
+Thanks to Alan Patterson for the idea of the immediate executor.
+
+You can help me to make this library better! Any feedback is very welcome.
+
+[endsect]

Modified: sandbox/async/libs/async/doc/appendices.qbk
==============================================================================
--- sandbox/async/libs/async/doc/appendices.qbk (original)
+++ sandbox/async/libs/async/doc/appendices.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -15,7 +15,7 @@
 
 [include implementation.qbk]
 
-[include acknowledgements.qbk]
+[include acknowledgments.qbk]
 
 [include tests.qbk]
 [include tickets.qbk]
@@ -82,7 +82,7 @@
 
 [section For later releases]
 
-[heading Use C++0x variadic templates on compilers supporting it and use the preprocesor otherwise]
+[heading Use C++0x variadic templates on compilers supporting it and use the preprocessor otherwise]
 
 [heading Use C++0x Concepts on compilers supporting them and use the Boost.ConceptCheck or Boost.ConceptTraits otherwise]
 

Modified: sandbox/async/libs/async/doc/async.qbk
==============================================================================
--- sandbox/async/libs/async/doc/async.qbk (original)
+++ sandbox/async/libs/async/doc/async.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -6,7 +6,7 @@
   http://www.boost.org/LICENSE_1_0.txt).
 ]
 
-[article Async
+[article Toward Boost Async
     [quickbook 1.4]
     [authors [Botet Escriba, Vicente J.]]
     [copyright 2008-2009 Vicente J. Botet Escriba]

Modified: sandbox/async/libs/async/doc/case_studies.qbk
==============================================================================
--- sandbox/async/libs/async/doc/case_studies.qbk (original)
+++ sandbox/async/libs/async/doc/case_studies.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -16,7 +16,7 @@
 [section Parallel sort]
 [/==================================]
 
-Next follows a generic algorithm based on partitioning od a given problem in smaler problems, and compose a solution from the solution of the smaller problems.
+Next follows a generic algorithm based on partitioning of a given problem in smaller problems, and compose a solution from the solution of the smaller problems.
 
     template <
         typename DirectSolver,

Modified: sandbox/async/libs/async/doc/changes.qbk
==============================================================================
--- sandbox/async/libs/async/doc/changes.qbk (original)
+++ sandbox/async/libs/async/doc/changes.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -7,7 +7,11 @@
 
 [section:changes Appendix A: History]
 
-[section [*Version 0.2, May 07, 2009] Adaptation to Boost 1.39]
+[section [*Version 0.2, May 07, 2009] Adding immediate asynchronous executor + Adaptation to Boost 1.39]
+
+[*Features:]
+
+* Immediate asynchronous executor
 
 [endsect]
 
@@ -18,16 +22,16 @@
 * An asynchronous execution framework working with __AE__ and __ACT__. It includes some generic functions and several __AE__ and __ACT__:
     * fork and fork_all to execute asynchronously functions
     * fork_after: request an __AE__ to execute a function asynchronously once each one of __ACT__ in the dependency tuple parameter are ready. It is similar to the async_with_dependencies proposed Peter Dimov.
- * generic get, join, ... free functions to synchroyze on an __ACT__
- * generic get_all, join_all, ... free functions to synchroyze on multiple __ACT__
+ * generic get, join, ... free functions to synchronize on an __ACT__
+ * generic get_all, join_all, ... free functions to synchronize on multiple __ACT__
     * generic wait_for_all, wait_for_any to execute asynchronously functions and wait for the completion of all or any of them.
 
 * Some __AE__ and __ACT__ models
     * basic_threader: can be seen as a thread factory executing asynchronously a function on the returned thread.
- * launchers: Lanchers can be seen as a future factory executing asynchronously a function on a hiden thread.
+ * launchers: Launchers can be seen as a future factory executing asynchronously a function on a hidden thread.
     * threader/joiner: A Threader runs a unary function in its own thread. A Threader can be seen as a Joiner
     factory executing asynchronously a function on a thread encapsulated on the returned Joiner. The joiner is used
- to synchronise with and pick up the result from a function or to manage the encapsulated thread.
+ to synchronize with and pick up the result from a function or to manage the encapsulated thread.
     * __tp_pool__ and __tp_task__ customization as an __AE__ and an __ACT__ respectively. __tp_pool__ can be seen as
     a __tp_task__ factory executing asynchronously a function on a pool of threads.
     * a generic asynchronous_executor_decorator which allows to decorate the function to be evaluated asynchronously.

Modified: sandbox/async/libs/async/doc/concepts.qbk
==============================================================================
--- sandbox/async/libs/async/doc/concepts.qbk (original)
+++ sandbox/async/libs/async/doc/concepts.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -72,7 +72,7 @@
 
 [variablelist
 [[Effects:] [Blocks until the `act` completes.]]
-[[Sychronization:][The completion of `act` happens before wait() returns.]]
+[[Synchronization:][The completion of `act` happens before wait() returns.]]
 [[Throws:] [the stored exception, if an exception was stored and not retrieved before.]]
 [[Postconditions:] [is_ready(act) == true.]]
 [[Thread safety:][unsafe]]
@@ -88,7 +88,7 @@
 
 [variablelist
 [[Effects:] [Blocks until the `act` completes or `abs_time` is not reached.]]
-[[Sychronization:][The completion of the `act` happens before wait() returns.]]
+[[Synchronization:][The completion of the `act` happens before wait() returns.]]
 [[Returns:] [true only if the function returns because `act` is ready.]]
 [[Throws:] [the stored exception, if an exception was stored and not retrieved before.]]
 [[Postconditions:] [is_ready() == true.]]
@@ -102,7 +102,7 @@
 
 [variablelist
 [[Effects:] [blocks until the `act` completes or `rel_time` has elapsed.]]
-[[Sychronization:][The completion of the `act` happens before wait() returns.]]
+[[Synchronization:][The completion of the `act` happens before wait() returns.]]
 [[Returns:] [true only if the function returns because `act` is ready.]]
 [[Throws:] [the stored exception, if an exception was stored and not retrieved before.]]
 [[Postconditions:] [is_ready() == true.]]
@@ -123,7 +123,7 @@
 [/=============================]
 [section:FutureBasedACT Concept `FutureBasedACT` ]
 [/=============================]
-The completion of the __FutureBasedACT__ is undefined at this level but occurs usualy after a set_calue or set_exception on the associated promise.
+The completion of the __FutureBasedACT__ is undefined at this level but occurs usually after a set_value or set_exception on the associated promise.
 
 
 [heading Description]
@@ -144,7 +144,7 @@
 
 [heading Expression requirements]
 
-A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+A type models an __FutureBasedACT__ if, in addition to being an __ACT__,
 the following expressions are valid:
 
 [table
@@ -170,7 +170,7 @@
 
 [variablelist
 [[Effects:] [Retrieves the value returned by the Nullary function.]]
-[[Sychronization:][The completion of the `act` happens before get() returns.]]
+[[Synchronization:][The completion of the `act` happens before get() returns.]]
 [[Returns:] [Depending on the nature of the ACT returns a `act_traits<ACT>::move_dest_type`.]]
 [[Throws:] [the stored exception, if an exception was stored and not retrieved before.]]
 [[Postconditions:] [if `act_traits<ACT>::move_result` is `true` it is unspecified what happens when `get()` is called a second time on the same shared_joiner.]]
@@ -214,7 +214,7 @@
 [section:ThreadBasedACT Concept `ThreadBasedACT` ]
 [/=============================]
 
-The completion of the __ThreadBasedACT__ is undefined at this level but occurs usualy after a function finish.
+The completion of the __ThreadBasedACT__ is undefined at this level but occurs usually after a function finish.
 
 [heading Description]
 
@@ -234,7 +234,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+A type models an __FutureBasedACT__ if, in addition to being an __ACT__,
 the following expressions are valid:
 
 [table
@@ -253,9 +253,9 @@
 [table
     [[Expression] [Semantics]]
     [[`b = joinable(cact)`] [true if `cact` refers to a 'thread of execution', false otherwise]]
- [[`join(act)`] [waits for the assoiated 'thread of execution' to complete]]
- [[`b = join_until(act, abs_time)`] [waits for the assoiated 'thread of execution' to complete or the time `wait_until` has been reach.]]
- [[`b = join_for(act, rel_time)`] [waits for the assoiated 'thread of execution' to complete or the specified duration `rel_time` has elapsed ]]
+ [[`join(act)`] [waits for the associated 'thread of execution' to complete]]
+ [[`b = join_until(act, abs_time)`] [waits for the associated 'thread of execution' to complete or the time `wait_until` has been reach.]]
+ [[`b = join_for(act, rel_time)`] [waits for the associated 'thread of execution' to complete or the specified duration `rel_time` has elapsed ]]
     [[`detach(act)`] [the associated 'thread of execution' becomes detached, and no longer has an associated one]]
     [[`interrupt(act)`] [request that the associated 'thread of execution' be interrupted the next time it enters
     one of the predefined interruption points with interruption enabled, or if it is currently blocked in a call to one of the
@@ -264,7 +264,7 @@
     [[`id = get_id(cact)`] [an instance of `act_traits<__ACT__>::id_type` that represents the associated 'thread of execution'.]]
 ]
 
-[heading Expresion `b=joinable(act)`]
+[heading Expression `b=joinable(act)`]
 [/==========================================================================================]
 
 [variablelist
@@ -273,7 +273,7 @@
 ]
 
 
-[heading Expresion `join()`]
+[heading Expression `join()`]
 [/==========================================================================================]
 
 [variablelist
@@ -285,7 +285,7 @@
 [[Notes:] [`join()` is one of the predefined __interruption_points__.]]
 ]
 
-[heading Expresion `b=join_until(act)|b=join_for(act)`]
+[heading Expression `b=join_until(act)|b=join_for(act)`]
 [/==========================================================================================]
 
     bool join_until(const system_time& wait_until);
@@ -306,7 +306,7 @@
 [[Notes:] [`join_until()` is one of the predefined __interruption_points__.]]
 ]
 
-[heading Expresion `detach(act)`]
+[heading Expression `detach(act)`]
 [/==========================================================================================]
 
 [variablelist
@@ -315,7 +315,7 @@
 [[Throws:] [Nothing]]
 ]
 
-[heading Expresion `get_id(cact)`]
+[heading Expression `get_id(cact)`]
 [/==========================================================================================]
 
 
@@ -325,7 +325,7 @@
 [[Throws:] [Nothing]]
 ]
 
-[heading Expresion `interrupt(act)`]
+[heading Expression `interrupt(act)`]
 [/==========================================================================================]
 
 
@@ -336,7 +336,7 @@
 [[Throws:] [Nothing]]
 ]
 
-[heading Expresion `h = native_handle(act)`]
+[heading Expression `h = native_handle(act)`]
 [/==========================================================================================]
 
 
@@ -433,7 +433,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __IAE__ if, in adition to being an __AE__,
+A type models an __IAE__ if, in addition to being an __AE__,
 the following expressions are valid:
 
 [table

Modified: sandbox/async/libs/async/doc/concepts_intrinsics.qbk
==============================================================================
--- sandbox/async/libs/async/doc/concepts_intrinsics.qbk (original)
+++ sandbox/async/libs/async/doc/concepts_intrinsics.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -58,7 +58,7 @@
 
 [variablelist
 [[Effects:] [Blocks until the Nullary function ends.]]
-[[Sychronization:][The completion of the call to the operator()() the Nullary function happens before wait() returns.]]
+[[Synchronization:][The completion of the call to the operator()() the Nullary function happens before wait() returns.]]
 [[Throws:] [the stored exception, if an exception was stored and not retrieved before.]]
 [[Postconditions:] [is_ready(act) == true.]]
 [[Thread safety:][unsafe]]
@@ -98,7 +98,7 @@
 
 [heading Expression requirements]
 
-A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+A type models an __FutureBasedACT__ if, in addition to being an __ACT__,
 the following expressions are valid:
 
 [table
@@ -156,7 +156,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __IntrinsicThreadBasedACT__ if, in adition to being an __ThreadBasedACT__,
+A type models an __IntrinsicThreadBasedACT__ if, in addition to being an __ThreadBasedACT__,
 the following expressions are valid:
 
 [table
@@ -174,9 +174,9 @@
 [table
     [[Expression] [Semantics]]
     [[`b = act.joinable()`] [true if *this refers to a thread of execution, false otherwise]]
- [[`act.join()`] [waits for the assoiated thread of execution to complete]]
- [[`b = act.join_until(abs_time)`] [waits for the assoiated thread of execution to complete or the time wait_until has been reach.]]
- [[`b = act.join_for(rel_time)`] [waits for the assoiated thread of execution to complete or the specified duration rel_time has elapsed ]]
+ [[`act.join()`] [waits for the associated thread of execution to complete]]
+ [[`b = act.join_until(abs_time)`] [waits for the associated thread of execution to complete or the time wait_until has been reach.]]
+ [[`b = act.join_for(rel_time)`] [waits for the associated thread of execution to complete or the specified duration rel_time has elapsed ]]
     [[`act.detach()`] [the associated thread of execution becomes detached, and no longer has an associated one]]
     [[`act.interrupt()`] [request that the associated thread of execution be interrupted the next time it enters
     one of the predefined interruption points with interruption enabled, or if it is currently blocked in a call to one of the
@@ -270,7 +270,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __IAE__ if, in adition to being an __AE__,
+A type models an __IAE__ if, in addition to being an __AE__,
 the following expressions are valid:
 
 [table

Modified: sandbox/async/libs/async/doc/installation.qbk
==============================================================================
--- sandbox/async/libs/async/doc/installation.qbk (original)
+++ sandbox/async/libs/async/doc/installation.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -76,7 +76,7 @@
 ]
 ]
 
-And also will depend on a near future, conditionaly, on the following libraries that are even not submited to Boost.
+And also will depend on a near future, conditionally, on the following libraries that are even not submitted to Boost.
 [variablelist
 [
     [[@https://svn.boost.org/svn/boost/sandbox/chrono/ [*Boost.Chrono]]] [for time and duration]

Modified: sandbox/async/libs/async/doc/introduction.qbk
==============================================================================
--- sandbox/async/libs/async/doc/introduction.qbk (original)
+++ sandbox/async/libs/async/doc/introduction.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -61,7 +61,7 @@
 the function, others allow to manage the underlying thread of execution.
 
 It seems natural to make a generic __fork__ function that will evaluate a function asynchronously
-with respect to the calling thread and returns an ACT handle. The following metafunction
+with respect to the calling thread and returns an ACT handle. The following meta-function
 associates an ACT handle to an asynchronous executor.
 
     template <typename AE, typename T>
@@ -263,6 +263,7 @@
 
         BOOST_AUTO(fm1, basync::fork(ae, f, 1.0, 1000000 ));
 
+As a extreme case the library provides a immediate executor which allows to execute synchronously the function on the current thread. This can be used for test purposes. Note that this executor can not be used when there are dependencies between the children __ACT__ and the parent __ACT__.
 
 The library allows also to fork several functions at one time
 
@@ -348,9 +349,10 @@
 
 So the user can do the following
 
- result_of::fork_all<AE, int(*)(), int(*)(), int(*)()>::type res = basync::fork_all(ae, f, g, h);
- result_of::get_all<result_of::fork_all<AE, int(*)(), int(*)(), int(*)()>::type>::type values
- = basync::get_all(handles);
+ result_of::fork_all<AE, int(*)(), int(*)(), int(*)()>::type res =
+ basync::fork_all(ae, f, g, h);
+ result_of::get_all<result_of::fork_all<AE, int(*)(), int(*)(), int(*)()>::type>::type values =
+ basync::get_all(handles);
 
 or using a typedef
 
@@ -371,14 +373,17 @@
 Last but not least the library provides also some sugaring functions like
 wait_for_all that forks and wait for the completion of all the functions.
 
- result_of::wait_for_all<AE, int(*)(), int(*)(), int(*)()>::type res = basync::wait_for_all(ae, f, g, h);
+ result_of::wait_for_all<AE, int(*)(), int(*)(), int(*)()>::type res =
+ basync::wait_for_all(ae, f, g, h);
     std::cout << get<1>(res) - get<0>(res) + get<2>(res) << std::endl;
 
 and wait_for_any, which works only with functions that return the same type or are convertible to the same
 type, and return the index and the value of any of the completed functions.
 
- result_of::wait_for_any<AE, int(*)(), int(*)(), int(*)()>::type res = basync::wait_for_any(ae, f, g, h);
- std::cout << "function " << res.first << " finshed first with result=" << res.second << std::endl;
+ result_of::wait_for_any<AE, int(*)(), int(*)(), int(*)()>::type res =
+ basync::wait_for_any(ae, f, g, h);
+ std::cout << "function " << res.first
+ << " finshed first with result=" << res.second << std::endl;
 
 The current implementation use the wait_for_any function so any AE must provide a way to get a
 unique|shared_future from its __ACT__.
@@ -392,8 +397,6 @@
         { return act.get_future(); }
     };
 
-Future versions will use the set_once synchronization.
-
 Resuming a simple way to define a new AsynchronousExecutor is to define a class as
 
     struct AsynchronousExecutor {
@@ -421,6 +424,8 @@
 
 The main specificity is that here we make a difference between unique_joiner (move-only) and shared_joiner and as consequence unique_threader and shared_threader.
 
+The second specificity concerns the fact joiners can detach, terminate, ... on destruction.
+
 
 [endsect]
 

Modified: sandbox/async/libs/async/doc/models.qbk
==============================================================================
--- sandbox/async/libs/async/doc/models.qbk (original)
+++ sandbox/async/libs/async/doc/models.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -83,7 +83,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+A type models an __FutureBasedACT__ if, in addition to being an __ACT__,
 the following expressions are valid:
 
 [table
@@ -128,7 +128,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+A type models an __FutureBasedACT__ if, in addition to being an __ACT__,
 the following expressions are valid:
 
 [table
@@ -235,7 +235,7 @@
 ]
 
 [heading Expression requirements]
-A type models an __IAE__ if, in adition to being an __AE__,
+A type models an __IAE__ if, in addition to being an __AE__,
 the following expressions are valid:
 
 [table

Modified: sandbox/async/libs/async/doc/overview.qbk
==============================================================================
--- sandbox/async/libs/async/doc/overview.qbk (original)
+++ sandbox/async/libs/async/doc/overview.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -18,23 +18,24 @@
 * An asynchronous execution framework working with __AE__ and __ACT__. It includes some generic functions and several __AE__ and __ACT__:
     * fork and fork_all to execute asynchronously functions
     * fork_after: request an __AE__ to execute a function asynchronously once each one of __ACT__ in the dependency tuple parameter are ready. It is similar to the async_with_dependencies proposed Peter Dimov.
- * generic get, join, ... free functions to synchroyze on an __ACT__
- * generic get_all, join_all, ... free functions to synchroyze on multiple __ACT__
+ * generic get, join, ... free functions to synchronize on an __ACT__
+ * generic get_all, join_all, ... free functions to synchronize on multiple __ACT__
     * generic wait_for_all, wait_for_any to execute asynchronously functions and wait for the completion of all or any of them.
 
 * Some __AE__ and __ACT__ models
+ * immediate executors: executes synchronously a function on the current thread. Often used for test purposes
     * basic_threader: can be seen as a thread factory executing asynchronously a function on the returned thread.
- * launchers: Lanchers can be seen as a future factory executing asynchronously a function on a hiden thread.
+ * launchers: Lanchers can be seen as a future factory executing asynchronously a function on a hidden thread.
     * threader/joiner: A Threader runs a unary function in its own thread. A Threader can be seen as a Joiner
     factory executing asynchronously a function on a thread encapsulated on the returned Joiner. The joiner is used
- to synchronise with and pick up the result from a function or to manage the encapsulated thread.
+ to synchronize with and pick up the result from a function or to manage the encapsulated thread.
     * __tp_pool__ and __tp_task__ customization as an __AE__ and an __ACT__ respectively. __tp_pool__ can be seen as
     a __tp_task__ factory executing asynchronously a function on a pool of threads.
     * a generic asynchronous_executor_decorator which allows to decorate the function to be evaluated asynchronously.
 
 References
 
-* threader/joiner are based on the original idea of Kevlin Henney [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf N1833 - Preliminary Threading Library Proposal for TR2]
+* The threader-joiner classes are based on the original idea of Kevlin Henney [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf N1833 - Preliminary Threading Library Proposal for TR2]
 
 
 [/====================================]

Modified: sandbox/async/libs/async/doc/reference.qbk
==============================================================================
--- sandbox/async/libs/async/doc/reference.qbk (original)
+++ sandbox/async/libs/async/doc/reference.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -67,6 +67,8 @@
 
 [section AE/ACT Models Reference]
 
+[include reference/future_traits.qbk]
+[include reference/immediate.qbk]
 [include reference/basic_threader.qbk]
 [include reference/launcher.qbk]
 [include reference/threader.qbk]

Modified: sandbox/async/libs/async/doc/users_guide.qbk
==============================================================================
--- sandbox/async/libs/async/doc/users_guide.qbk (original)
+++ sandbox/async/libs/async/doc/users_guide.qbk 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -35,9 +35,9 @@
 [endsect]
 
 
-[/=======================]
-[section:glosary Glossary]
-[/=======================]
+[/========================]
+[section:glossary Glossary]
+[/========================]
 
 
 [variablelist

Modified: sandbox/async/libs/async/test/Jamfile.v2
==============================================================================
--- sandbox/async/libs/async/test/Jamfile.v2 (original)
+++ sandbox/async/libs/async/test/Jamfile.v2 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -52,6 +52,7 @@
     test-suite "tests"
         :
 # [ async-run test_basic_threader.cpp ]
+ [ async-run test_inmediate.cpp ]
            [ async-run test_launcher.cpp ]
            [ async-run test_threader.cpp ]
            [ async-run test_thread_pool.cpp ]

Added: sandbox/async/libs/async/test/test_immediate.cpp
==============================================================================
--- (empty file)
+++ sandbox/async/libs/async/test/test_immediate.cpp 2009-05-24 11:21:47 EDT (Sun, 24 May 2009)
@@ -0,0 +1,229 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2008-2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/sync for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include <boost/async/immediate.hpp>
+#include <boost/async/typeof/future.hpp>
+#include <boost/async/algorithm.hpp>
+
+#include <iostream>
+#include <boost/test/unit_test.hpp>
+#include <libs/async/test/data_types.hpp>
+#include <libs/async/test/test_ae.hpp>
+
+using namespace boost::unit_test;
+namespace basync = boost::async;
+namespace bfus = boost::fusion;
+
+#if 0
+void do_test_member_lazy_fork() {
+ basync::shared_immediate ae;
+ aetst::do_test_member_lazy_fork(ae);
+}
+#endif
+void do_test_member_fork_move_unique() {
+ basync::unique_immediate ae;
+ aetst::do_test_member_fork_m_fut(ae);
+}
+
+void do_test_member_fork() {
+ basync::shared_immediate ae;
+ aetst::do_test_member_fork(ae);
+}
+void do_test_member_fork_move() {
+ basync::shared_immediate ae;
+ aetst::do_test_member_fork_m_fut(ae);
+}
+
+void do_test_member_fork_bind() {
+ basync::shared_immediate ae;
+ aetst::do_test_member_fork_bind(ae);
+}
+
+void do_test_member_fork_bind_move() {
+ basync::unique_immediate ae;
+ test_value=0;
+ boost::unique_future<int> fut = ae.fork(boost::bind(simple_thread_1, 2));
+ int res_value = fut.get();
+ BOOST_CHECK_EQUAL(test_value, 2);
+ BOOST_CHECK_EQUAL(res_value, 2);
+}
+
+void do_test_fork() {
+ basync::shared_immediate ae;
+ aetst::do_test_fork(ae);
+}
+
+void do_test_fork_move() {
+ basync::unique_immediate ae;
+ test_value=0;
+ boost::unique_future<int> fut = basync::fork(ae, simple_thread);
+ int res_value = fut.get();
+ BOOST_CHECK_EQUAL(test_value, 999);
+ BOOST_CHECK_EQUAL(res_value, 999);
+}
+
+void do_test_fork_1() {
+ basync::shared_immediate ae;
+ aetst::do_test_fork_1(ae);
+}
+void do_test_fork_1_move() {
+ basync::unique_immediate ae;
+ test_value=0;
+ boost::unique_future<int> fut = fork(ae, simple_thread_1, 2);
+ int res_value = fut.get();
+ BOOST_CHECK_EQUAL(test_value, 2);
+ BOOST_CHECK_EQUAL(res_value, 2);
+}
+
+void do_test_creation_through_functor()
+{
+ basync::shared_immediate ae;
+ aetst::do_test_creation_through_functor(ae);
+}
+
+void do_test_creation_through_functor_move()
+{
+ basync::unique_immediate ae;
+ copyable_functor f;
+ boost::unique_future<int> act=basync::fork(ae, f);
+
+ int res = act.get();
+ BOOST_CHECK_EQUAL(res, 999);
+}
+
+void do_test_creation_through_reference_wrapper()
+{
+ basync::shared_immediate ae;
+ aetst::do_test_creation_through_reference_wrapper(ae);
+}
+
+
+void do_test_wait() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait(ae);
+}
+
+void do_test_wait_until() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_until(ae);
+}
+
+void do_test_wait_for() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_for(ae);
+}
+
+void do_test_join() {
+ basync::shared_immediate ae;
+ aetst::do_test_join(ae);
+}
+
+void do_test_join_until() {
+ basync::shared_immediate ae;
+ aetst::do_test_join_until(ae);
+}
+
+void do_test_join_for() {
+ basync::shared_immediate ae;
+ aetst::do_test_join_for(ae);
+}
+
+void do_test_join_all() {
+ basync::shared_immediate ae;
+ aetst::do_test_join_all(ae);
+}
+
+void do_test_wait_all() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_all(ae);
+}
+
+void do_test_wait_for_any() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_for_any(ae);
+}
+
+void do_test_set_all() {
+ basync::shared_immediate ae;
+ aetst::do_test_set_all(ae);
+}
+
+void do_test_get() {
+ basync::shared_immediate ae;
+ aetst::do_test_get(ae);
+}
+
+void do_test_get_all() {
+ basync::shared_immediate ae;
+ aetst::do_test_set_all(ae);
+}
+
+void do_test_wait_for_all() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_for_all(ae);
+}
+
+void do_test_wait_all_until() {
+ basync::shared_immediate ae;
+ aetst::do_test_wait_all_until(ae);
+}
+
+void do_test_fork_after_wait() {
+ basync::shared_immediate ae;
+ aetst::do_test_fork_after_wait(ae);
+}
+void do_test_fork_after_get() {
+ basync::shared_immediate ae;
+ aetst::do_test_fork_after_get(ae);
+}
+
+test_suite* init_unit_test_suite(int, char*[])
+{
+ test_suite* test = BOOST_TEST_SUITE("immediate");
+
+ test->add(BOOST_TEST_CASE(&do_test_member_fork));
+ test->add(BOOST_TEST_CASE(&do_test_member_fork_move));
+ test->add(BOOST_TEST_CASE(&do_test_member_fork_bind));
+ test->add(BOOST_TEST_CASE(&do_test_member_fork_bind_move));
+ test->add(BOOST_TEST_CASE(&do_test_fork));
+ test->add(BOOST_TEST_CASE(&do_test_fork_move));
+ test->add(BOOST_TEST_CASE(&do_test_fork_1));
+ test->add(BOOST_TEST_CASE(&do_test_fork_1_move));
+ test->add(BOOST_TEST_CASE(&do_test_creation_through_functor));
+ test->add(BOOST_TEST_CASE(&do_test_creation_through_reference_wrapper));
+
+ test->add(BOOST_TEST_CASE(&do_test_get));
+ test->add(BOOST_TEST_CASE(&do_test_wait));
+ test->add(BOOST_TEST_CASE(&do_test_wait_until));
+ test->add(BOOST_TEST_CASE(&do_test_wait_for));
+ test->add(BOOST_TEST_CASE(&do_test_wait_all));
+ test->add(BOOST_TEST_CASE(&do_test_wait_all_until));
+ test->add(BOOST_TEST_CASE(&do_test_set_all));
+ test->add(BOOST_TEST_CASE(&do_test_get_all));
+
+ test->add(BOOST_TEST_CASE(&do_test_join));
+ test->add(BOOST_TEST_CASE(&do_test_join_until));
+ test->add(BOOST_TEST_CASE(&do_test_join_for));
+ test->add(BOOST_TEST_CASE(&do_test_join_all));
+ //test->add(BOOST_TEST_CASE(&do_test_join_all_until));
+ //test->add(BOOST_TEST_CASE(&do_test_join_all_for));
+
+
+ test->add(BOOST_TEST_CASE(&do_test_wait_for_all));
+ test->add(BOOST_TEST_CASE(&do_test_wait_for_any));
+ test->add(BOOST_TEST_CASE(&do_test_fork_after_wait));
+ test->add(BOOST_TEST_CASE(&do_test_fork_after_get));
+
+#if 0
+ test->add(BOOST_TEST_CASE(&do_test_member_lazy_fork));
+#endif
+ return test;
+}
+


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