Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50764 - sandbox/interthreads/libs/interthreads/doc
From: vicente.botet_at_[hidden]
Date: 2009-01-25 08:08:55


Author: viboes
Date: 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
New Revision: 50764
URL: http://svn.boost.org/trac/boost/changeset/50764

Log:
interthreads version 0.3.1
Most bugs fixed

Added:
   sandbox/interthreads/libs/interthreads/doc/concepts.qbk (contents, props changed)
Text files modified:
   sandbox/interthreads/libs/interthreads/doc/acknowledgements.qbk | 2
   sandbox/interthreads/libs/interthreads/doc/appendices.qbk | 24
   sandbox/interthreads/libs/interthreads/doc/case_studies.qbk | 21 -
   sandbox/interthreads/libs/interthreads/doc/changes.qbk | 68 +++
   sandbox/interthreads/libs/interthreads/doc/interthreads.qbk | 42 ++
   sandbox/interthreads/libs/interthreads/doc/overview.qbk | 2
   sandbox/interthreads/libs/interthreads/doc/reference.qbk | 624 +++++++++++++++++++++++++++++++++++++++
   7 files changed, 728 insertions(+), 55 deletions(-)

Modified: sandbox/interthreads/libs/interthreads/doc/acknowledgements.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/acknowledgements.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/acknowledgements.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -13,7 +13,7 @@
 
 Thanks also must go to Jochen Heckl for the ideas given respect to the thread_tuple::wait_first implementation.
 
-The Threader/Joiner design is taken from [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf N1833 - Preliminary Threading Library Proposal for TR2]
+The Threader|Joiner design is 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.

Modified: sandbox/interthreads/libs/interthreads/doc/appendices.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/appendices.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/appendices.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -22,14 +22,14 @@
 [section:todo Appendix E: Future plans]
 [/=====================================]
 
-[heading Tasks to do before review]
+[section Tasks to do before review]
 [variablelist
 
-[[Solve the bugs] [v0.3#1 v0.3#2 v0.3#3 v0.2#1 v0.2#2]]
+[[Solve the bugs] [v0.2#1]]
 
-[[Add polymorph act and adapters] []]
+[[Add polymorphic act and adapters] []]
 
-[[Add examples] [ae/act framework.]]
+[[Add more examples] [ae/act framework.]]
 
 [[Complete the reference] [ae/act framework, typeof.]]
 
@@ -39,19 +39,20 @@
 wait_for_any to implement this feauture, which add an superflous constraint be able to get a future to all the AE/ACT.
 In adition the wait_for_any has now 0(N) complexity.]]
 
-[[Complete the tests] [Even if the current release incluse more test here is yet a long way before been able to review the library.]]
-
-[[Add C++0x move semantics on compilers supporting it and use the Boost.Move emulation otherwise] [.]]
-
-[[Use C++0x variadic templates on compilers supporting it and the Use the preprocesor otherwise] [.]]
+[[Complete the tests] [Even if the current release include some test there is yet a long way before been able to review the library.]]
 
 [[Complete the STM example] [.]]
 
 [[Optimize the TSSS maps using intrusive containers] [.]]
 
+[[Add C++0x move semantics on compilers supporting it and use the Boost.Move emulation otherwise] [.]]
+
+[[Use C++0x variadic templates on compilers supporting it and the Use the preprocesor otherwise] [.]]
+
 ]
+[endsect]
 
-[heading For later releases]
+[section For later releases]
 
 [variablelist
 [
@@ -138,11 +139,12 @@
 others keys.
 
 Configuration the fixed/variable/mixed key range, ordered/unordered map, intrusive/extrusive map, shared/exclusive locking.
+[endsect]
 
 
 [endsect]
 [endsect]
-
 [endsect]
 
 
+

Modified: sandbox/interthreads/libs/interthreads/doc/case_studies.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/case_studies.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/case_studies.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -9,26 +9,7 @@
 [section Examples]
 [/============================]
 
-This section do includes complete examples using the library, but some case studies that use in some way the library.
-I'm now working on the STM project. The deferred log, though tricky, are not huge and would be suitable for someone
-who has a limited time to spend on them.
-
-[/==================================]
-[section thread_tuple_once]
-[/==================================]
-
-thread_tuple_once.hpp is a good example of the use of set_once.
-
-[endsect]
-
-[/==================================]
-[section thread_keep_alive]
-[/==================================]
-
-thread_keep_alive.hpp and thread_keep_alive.cpp is a good example of the use of thread_decoration, thread_specific_shared_pointer.
-
-[endsect]
-
+This section do includes complete examples using the library.
 
 [/==================================]
 [section Thread safe deferred traces]

Modified: sandbox/interthreads/libs/interthreads/doc/changes.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/changes.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/changes.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -7,17 +7,41 @@
 
 [section:changes Appendix A: History]
 
-[heading [*Version 0.3, January 19, 2009] Asynchronous execution and test on more toolsets]
+[section [*Version 0.3.1, January 25, 2009] bug fixes]
 
-[*Features:]
+[*Fixed Bugs:]
+
+[*v0.3#3: scheduler::do_test_fork_after_wait do not work yet.]
+To solve this issue it enough to define boost::move for tp::task
+
+[*v0.3#2: scheduler::do_test_fork_after_get do not work yet.]
+To solve this issue it enough to define boost::move for tp::task
+
+[*v0.3#1: scheduler::do_test_wait_for_any do not work yet.]
+Not reproductible
+
+[*v0.2#2: Some trouble with the use of tp::pool directly, use scheduler instead.]
+Four issues.
+
+* The parameter to fork on tp:pool was a const F& instead of a F.
+* Direct use of fork_all resolved for the other AE by ADL, which could not be the case fro the tp::pool.
+* fork specialization for tp::pool incorrent.
+* use of the default handle instead of asynchronous_completion_token traits class
+
+[endsect]
+
+[section [*Version 0.3, January 19, 2009] fork after dependant act completes]
+
+[*New Features:]
 
 * fork_after: request the AE to execute a function asynchronously once each one of ACTs in the dependency tuple parameter are ready.
 * Add act traits, as value type, is movable, has_future_if, has_thread_if
  
+[endsect]
 
-[heading [*Version 0.2, January 14, 2009] Asynchronous execution and test on more toolsets]
+[section [*Version 0.2, January 14, 2009] Asynchronous execution and test on more toolsets]
 
-[*Features:]
+[*New Features:]
 
 * Asynchronous executors (AE) and asynchronous completion token (ACT) framework
     * fork and fork_all functions
@@ -38,11 +62,13 @@
 * Tested on Linux gcc 4.1.2.
 * Modification helping Windows (not tested)
 
-[*Closed Bugs:]
+[*Fixed Bugs:]
 
-* basic_keep_alive example do not link.
+[*v0.1#1: basic_keep_alive example do not link.]
 
-[heading [*Version 0.1, November 30, 2008] ['Announcement of Interthreads]]
+[endsect]
+
+[section [*Version 0.1, November 30, 2008] ['Announcement of Interthreads]]
 
 [*Features:]
 
@@ -50,20 +76,38 @@
 * thread specific shared pointer,
 * thread keep alive mechanism,
 * thread tuples, set_once synchonizer, thread_tuple_once and thread_group_once.
+
+[endsect]
  
-[heading [*Bugs:]]
+[section [*Bugs]]
+
+[heading [*Open Bugs:]]
+
+[*v0.2#1: ae::get_all do not work yet, use set_all instead.]
+get_all do not work because fusion transform sequence function can not take non const sequences.
+Maybe we can emulate it using set_all and a mpl a transformation for a tuple of ACT to a tuple of result_type.
+
+[heading [*Fixed Bugs:]]
 
 [*v0.3#3: scheduler::do_test_fork_after_wait do not work yet.]
+To solve this issue it enough to define boost::move for tp::task
+
 [*v0.3#2: scheduler::do_test_fork_after_get do not work yet.]
+To solve this issue it enough to define boost::move for tp::task
+
 [*v0.3#1: scheduler::do_test_wait_for_any do not work yet.]
+Not reproductible
 
 [*v0.2#2: Some trouble with the use of tp::pool directly, use scheduler instead.]
-[*v0.2#1: ae::get_all do not work yet, use set_all instead.]
-get_all do not work because fusion transform sequence function can not take non const sequences.
-Maybe we can emulate it using set_all and a mpl a transformation for a tuple of ACT to a tuple of result_type.
+Four issues.
 
-CLOSED [*v0.1#1: basic_keep_alive example do not link.]
+* The parameter to fork on tp:pool was a const F& instead of a F.
+* Direct use of fork_all resolved for the other AE by ADL, which could not be the case fro the tp::pool.
+* fork specialization for tp::pool incorrent.
+* use of the default handle instead of asynchronous_completion_token traits class
 
+[*v0.1#1: basic_keep_alive example do not link.]
 
+[endsect]
 
 [endsect]

Added: sandbox/interthreads/libs/interthreads/doc/concepts.qbk
==============================================================================
--- (empty file)
+++ sandbox/interthreads/libs/interthreads/doc/concepts.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -0,0 +1,293 @@
+[/
+ (C) Copyright 2008-20009 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 Concepts]
+[/===============]
+
+
+[/=============================================]
+[section Asynchronous Completion Token Concepts]
+[/=============================================]
+
+[/==================]
+[section Concept `ACT` ]
+[/==================]
+
+[heading Description]
+An __ACT__ allows to to wait for the completion of an asynchronous executed operation.
+An __ACT__ should be __Movable__ or __CopyConstructible__.
+
+[heading Notation]
+
+[variablelist
+ [[`act`] [An __ACT__]]
+ [[`f`] [A __Nullary__ function with type F]]
+ [[`abs_time`] [A __system_time__]]
+ [[`rel_time`] [A __Duration__]]
+ [[`b`] [A bool]]
+]
+
+[heading Expression requirements]
+A type models a __AE__ if, the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`act.wait()`] [void] [Constant]]
+ [[`b = act.wait_until(abs_time)`] [bool] [Constant]]
+ [[`b = act.wait_for(rel_time)`] [bool] [Constant]]
+]
+
+[heading Meta Expressions]
+[table
+ [[Expression] [Type] [Compile Time Complexity]]
+ [[`is_movable<ACT>::type`] [MPL boolean] [Constant]]
+ [[`has_future_if<ACT>::type`] [MPL boolean] [Constant]]
+ [[`has_thread_if<ACT>::type`] [MPL boolean] [Constant]]
+]
+
+[heading Expression Semantics]
+[
+table
+ [[Expression] [Semantics]]
+ [[`act.wait()`] [Waits until the `act` completes]]
+ [[`b = act.wait_until(abs_time)`] [Waits until the `act` completes until `abs_time` is not reached]]
+ [[`b = act.wait_for(rel_time)`] [Waits until the `act` completes for a `rel_time` duration]]
+]
+
+[heading Models]
+
+* __unique_future__
+* __shared_future__
+* __unique_joiner__
+* __shared_joiner__
+* __tp_task__
+* __thread__
+
+[endsect]
+
+[/=============================]
+[section Concept `FutureBasedACT` ]
+[/=============================]
+
+[heading Description]
+An __FutureBasedACT__ is a __ACT__ that associates a value expected on the its completion.
+
+[heading Notation]
+
+[variablelist
+ [[`act`] [An __ACT__]]
+ [[`f`] [A __Nullary__ function with type F]]
+ [[`abs_time`] [A __system_time__]]
+ [[`rel_time`] [A __Duration__]]
+ [[`b`] [A bool]]
+ [[`v`] [T]]
+]
+
+[heading Expression requirements]
+
+[heading Description]
+A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`b = act.is_ready()`] [bool] [Constant]]
+ [[`b = act.has_exception()`] [bool] [Constant]]
+ [[`b = act.has_value()`] [bool] [Constant]]
+]
+
+[heading Expression Semantics]
+[table
+ [[Expression] [Semantics]]
+ [[`b = act.is_ready()`] [Is true only if the associated state holds a value or an exception ready for retrieval.]]
+ [[`b = act.has_exception()`] [true only if the associated state contains an exception.]]
+ [[`b = act.has_value()`] [true only if the associated state contains a value]]
+ [[`v = act.get()`] [returns the stored value]]
+]
+
+[heading Models]
+
+* __unique_future__
+* __shared_future__
+* __unique_joiner__
+* __shared_joiner__
+* __tp_task__
+
+[endsect]
+
+[/=============================]
+[section Concept `ThreadBasedACT` ]
+[/=============================]
+
+[heading Description]
+
+An __ThreadBasedACT__ is a __ACT__ that that provides a thread like interface.
+
+[heading Notation]
+
+[variablelist
+ [[`act`] [An __ACT__]]
+ [[`f`] [A __Nullary__ function with type F]]
+ [[`abs_time`] [A __system_time__]]
+ [[`rel_time`] [A __Duration__]]
+ [[`b`] [A bool]]
+ [[`id`] [A thread::id]]
+]
+
+[heading Expression requirements]
+A type models an __FutureBasedACT__ if, in adition to being an __ACT__,
+the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`b = act.joinable()`] [bool] [Constant]]
+ [[`act.join()`] [void] [Constant]]
+ [[`b = act.join_until(abs_time)`] [bool] [Constant]]
+ [[`b = act.join_for(rel_time)`] [bool] [Constant]]
+ [[`act.detach()`] [void] [Constant]]
+ [[`act.interrupt()`] [void] [Constant]]
+ [[`b = act.interruption_requested()`] [bool] [Constant]]
+]
+
+[heading Expression Semantics]
+[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.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
+ predefined interruption points with interruption enabled]]
+ [[`b = act.interruption_requested()`] [true if interruption has been requested for the associated thread of execution, false otherwise. ]]
+ [[`is = act.get_id()`] [an instance of boost::thread::id that represents the associated thread of execution.]]
+]
+
+[heading Models]
+
+* __unique_joiner__
+* __shared_joiner__
+* __thread__
+* __tp_task__
+
+[endsect]
+
+[endsect]
+
+[/======================================]
+[section Asynchronous Executors Concepts]
+[/======================================]
+
+[/==========================================================================================]
+[section Concept `AsynchronousExecutor`]
+[/==========================================================================================]
+
+[heading Description]
+
+An __AsynchronousExecutor__ executes asynchronously a function and returns an __ACT__ when calling the fork function on it.
+
+[heading Notation]
+
+[variablelist
+ [[`ae`] [An __AE__]]
+ [[`f`] [A __Nullary__ function with type F]]
+ [[`act`] [An __ACT__]]
+]
+
+[heading Expression requirements]
+A type models a __AE__ if, the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`__fork__(ae, f)`] [__ACT__] [Constant]]
+ [[`get_future<AE>()(act)`] [__Future__] [Constant]]
+ [[`asynchronous_completion_token<AE, T>::type`] [Model of __ACT__ satisfying `__act_value<ACT>::type` is `T`] [Constant]]
+]
+
+[heading Expression Semantics]
+[
+table
+ [[Expression] [Semantics]]
+ [[`act = __fork__(ae, f)`] [request `ae` to execute asynchronously the function `f`and returns an __ACT__ ]]
+ [[`get_future<AE>()(act)`] [gets a reference to a __Future__]]
+]
+
+[heading Constraints]
+The following constraints applies:
+
+* `act_value<__ACT__>::type == boost::result_of<F()::type>`
+
+[heading Models]
+
+* __basic_threader__
+* __unique_threader__
+* __shared_threader__
+* __launcher__
+* __shared_launcher__
+* __scheduler__
+* __tp_pool__
+
+
+[endsect]
+
+
+[/==========================================================================================]
+[section Concept `IntrinsicAsynchronousExecutor`]
+[/==========================================================================================]
+
+[heading Description]
+
+The default fork implementation put some requirements in its __AE__ parameter. This concept is related to this.
+An __IAE__ is __AE__ that works well with the default implementation of __fork__.
+
+[heading Notation]
+
+[variablelist
+ [[`ae`] [An __IAE__]]
+ [[`f`] [A __Nullary__ function]]
+]
+
+[heading Expression requirements]
+A type models an __IAE__ if, in adition to being an __AE__,
+the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`ae.fork(f)`] [`handle<boost::result_of<F()>::type`] [Constant]]
+]
+
+[heading Meta Expressions]
+[table
+ [[Expression] [Model Of] [Compile Time Complexity]]
+ [[`handle<boost::result_of<F()>::type`] [__ACT__] [Constant ]]
+]
+
+[heading Expression Semantics]
+[
+table
+ [[Expression] [Semantics]]
+ [[`ae.fork(f)`] [executes asynchronously the function `f` and returns a __handle__ ]]
+]
+
+
+[heading Models]
+* __basic_threader__
+* __unique_threader__
+* __shared_threader__
+* __launcher__
+* __shared_launcher__
+* __scheduler__
+
+
+[endsect]
+
+[endsect]
+
+[endsect]

Modified: sandbox/interthreads/libs/interthreads/doc/interthreads.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/interthreads.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/interthreads.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -171,12 +171,54 @@
 [def __thread_tuple__ `thread_tuple<>`]
 [def __thread_group__ `boots::thread_group`]
 
+
+[def __AE__ `AsynchronousExecutor`]
+[def __AsynchronousExecutor__ `AsynchronousExecutor`]
+
+[def __IAE__ `IntrinsicAsynchronousExecutor`]
+
+[def __ACT__ `AsynchronousCompletionToken`]
+[def __FutureBasedACT__ `FutureBasedACT`]
+[def __Future__ `inherits from unique_future|shared_future`]
+[def __Nullary__ `Nullary`]
+[def __Movable__ `Movable`]
+[def __CopyConstructible__ `CopyConstructible`]
+[def __system_time__ `system_time`]
+
+[def __Duration__ `DurationType`]
+
+[def __fork__ `fork`]
+
+[def __unique_threader__ `unique_threader`]
+[def __shared_threader__ `shared_threader`]
+
+[def __unique_future__ `unique_future`]
+[def __shared_future__ `shared_future`]
+[def __unique_joiner__ `unique_joiner`]
+[def __shared_joiner__ `shared_joiner`]
+
+[def __basic_threader__ `basic_threader`]
+[def __unique_threader__ `unique_threader`]
+[def __shared_threader__ `shared_threader`]
+[def __launcher__ `launcher`]
+[def __shared_launcher__ `shared_launcher`]
+[def __scheduler__ `scheduler`]
+
+[def __tp_task__ `tp::task`]
+[def __tp_pool__ `tp::pool`]
+
+[def __handle__ `tp::task`]
+
+
+
+
 [warning InterThreads is not a part of the Boost libraries.]
 
 [include overview.qbk]
 
 [include users_guide.qbk]
 
+[include concepts.qbk]
 [include reference.qbk]
 
 [include case_studies.qbk]

Modified: sandbox/interthreads/libs/interthreads/doc/overview.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/overview.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/overview.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -47,6 +47,8 @@
 * thread_group_once: an extension of the boost::thread_group which allows to join the thread finishing
 the first, using for that the set_once synchronizer.
 
+References
+
 * thread_decorator and thread_specific_shared_ptr are based on the original implementation of
 [@http://www.boost-consulting.com/vault/index.php?directory=Concurrent%20Programming [*threadalert]]
 written by Roland Schwarz.

Modified: sandbox/interthreads/libs/interthreads/doc/reference.qbk
==============================================================================
--- sandbox/interthreads/libs/interthreads/doc/reference.qbk (original)
+++ sandbox/interthreads/libs/interthreads/doc/reference.qbk 2009-01-25 08:08:54 EST (Sun, 25 Jan 2009)
@@ -125,6 +125,301 @@
 [endsect]
 
 [/==========================================================================================]
+[section Header `<boost/interthreads/act_traits.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ template <typename ACT>
+ struct act_value;
+
+ template <typename ACT>
+ struct is_movable;
+
+ template <typename ACT>
+ struct has_future_if;
+
+ template <typename ACT>
+ struct has_thread_if;
+
+ template <typename AE, typename T>
+ struct asynchronous_completion_token;
+
+ template <typename AE>
+ struct get_future;
+
+}
+}
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/asynchronous_executor.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ template <typename AE, template <class> class Decorator>
+ struct asynchronous_executor_decorator : AE {
+ template <typename T>
+ struct handle {
+ typedef typename AE::template handle<T>::type type;
+ };
+
+ template <typename F>
+ typename AE::template handle< typename boost::result_of<F()>::type >::type
+ fork( F fn );
+
+ asynchronous_executor_decorator();
+
+ template <typename Nullary>
+ asynchronous_executor_decorator(thread::native_handle_attr_type& attr, Nullary f);
+
+ asynchronous_executor_decorator(Nullary f);
+
+ asynchronous_executor_decorator(boost::detail::thread_move_t<asynchronous_executor_decorator> x);
+
+ asynchronous_executor_decorator& operator=(boost::detail::thread_move_t<asynchronous_executor_decorator> x);
+
+ operator boost::detail::thread_move_t<asynchronous_executor_decorator>();
+
+ boost::detail::thread_move_t<asynchronous_executor_decorator> move();
+ };
+
+ template <typename AE, template <class> class Decorator>
+ struct get_future<asynchronous_executor_decorator<AE, Decorator> > {
+ template <typename T>
+ struct future_type {
+ typedef typename AE::template get_future<AE>::type type;
+ };
+ template <typename T>
+ typename future_type<T>::type& operator()(typename AE::template handle<T>::type & j);
+ };
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/asynchronous_adapter.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ template <typename AE, template <class> class Decorator>
+ struct asynchronous_executor_decorator : AE {
+ template <typename T>
+ struct handle {
+ typedef typename AE::template handle<T>::type type;
+ };
+
+ template <typename F>
+ typename AE::template handle< typename boost::result_of<F()>::type >::type
+ fork( F fn );
+
+ asynchronous_executor_decorator();
+
+ template <typename Nullary>
+ asynchronous_executor_decorator(thread::native_handle_attr_type& attr, Nullary f);
+ asynchronous_executor_decorator(Nullary f);
+
+ asynchronous_executor_decorator(boost::detail::thread_move_t<asynchronous_executor_decorator> x);
+
+ asynchronous_executor_decorator& operator=(boost::detail::thread_move_t<asynchronous_executor_decorator> x);
+
+ operator boost::detail::thread_move_t<asynchronous_executor_decorator>();
+
+ boost::detail::thread_move_t<asynchronous_executor_decorator> move();
+ };
+
+ template <typename AE, template <class> class Decorator>
+ struct get_future<asynchronous_executor_decorator<AE, Decorator> > {
+ template <typename T>
+ struct future_type {
+ typedef typename AE::template get_future<AE>::type type;
+ };
+ template <typename T>
+ typename future_type<T>::type& operator()(typename AE::template handle<T>::type & j);
+ };
+ }
+ }
+
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/basic_threader.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ class basic_threader {
+ public:
+ thread::native_handle_attr_type& attr();
+
+ template <typename T>
+ struct handle {
+ typedef thread type;
+ };
+
+ template <typename F> thread fork(F f);
+ };
+
+ template <>
+ struct act_value<thread> {
+ typedef void type;
+ };
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/basic_threader_decorator.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ typedef asynchronous_executor_decorator<basic_threader,thread_decorator> basic_threader_decorator;
+
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/fork_after.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ template <typename ACT>
+ struct act_wrapper {
+ act_wrapper();
+ void wait_initialized();
+ void set(ACT& other);
+ void set(boost::detail::thread_move_t<ACT> other);
+ void wait();
+ typename act_value<ACT>::type get();
+ void join();
+ };
+
+ template <typename ACT>
+ struct act_value<act_wrapper<ACT> > {
+ typedef typename act_value<ACT>::type type;
+ };
+
+ template <typename ACT>
+ struct is_movable<act_wrapper<ACT> > : is_movable<ACT>{};
+
+ template <typename ACT>
+ struct has_future_if<act_wrapper<ACT> > : has_future_if<ACT> {};
+
+ template <typename ACT>
+ struct has_thread_if<act_wrapper<ACT> > : has_thread_if<ACT>{};
+
+
+ namespace result_of {
+ template <typename AE,typename F>
+ struct fork_after {
+ typedef typename boost::result_of<F()>::type result_type;
+ typedef typename asynchronous_completion_token<AE, result_type>::type act_type;
+ typedef act_wrapper<act_type> type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename AE, typename F, typename D >
+ struct fork_after {
+ static typename result_of::fork_after<AE,F>::type
+ apply(AE& ae, F fn, D& d);
+ };
+ }
+ template< typename AE, typename F, typename D>
+ typename result_of::fork_after<AE,F>::type
+ fork_after( AE& ae, F fn, D& d);
+
+
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/scheduler.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ template <typename C>
+ class scheduler {
+ explicit scheduler(
+ tp::poolsize const& psize
+ );
+ template <typename T>
+ struct handle {
+ typedef tp::task<T> type;
+ };
+ template <typename F>
+ tp::task<typename boost::result_of<F()>::type>
+ fork(F f);
+ };
+
+ template <typename Channel>
+ struct get_future<scheduler<Channel> > {
+ template <typename T>
+ struct future_type {
+ typedef shared_future<T> type;
+ };
+ template <typename T>
+ shared_future<T>& operator()(tp::task<T>& act);
+ };
+
+ template <typename Channel, typename T>
+ struct asynchronous_completion_token<boost::tp::pool<Channel>,T> {
+ typedef boost::tp::task<T> type;
+ };
+
+ namespace partial_specialization_workaround {
+ template< typename Channel, typename F >
+ struct fork<boost::tp::pool<Channel>,F> {
+ static typename result_of::fork<boost::tp::pool<Channel>, F>::type
+ apply( boost::tp::pool<Channel>& ae, F fn );
+ };
+ }
+ template <typename C>
+ struct get_future<tp::pool<C> > {
+ template <typename T>
+ shared_future<T>& operator()(tp::task<T>& act);
+ };
+
+ template <typename ResultType>
+ struct act_value<tp::task<ResultType> > {
+ typedef ResultType type;
+ };
+
+ template <typename R>
+ struct is_movable<tp::task<R> > : mpl::false_{};
+
+ template <typename R>
+ struct has_future_if<tp::task<R> > : mpl::true_{};
+
+ template <typename R>
+ struct has_thread_if<tp::task<R> > : mpl::false_{};
+
+ }
+ }
+
+
+[endsect]
+
+[/==========================================================================================]
 [section Header `<boost/interthreads/fork_all.hpp>`]
 [/==========================================================================================]
 
@@ -350,6 +645,251 @@
 [endsect]
 
 [/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/detach_all.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct detach {
+ typedef void result_type;
+ template<typename ACT>
+ void operator()(ACT& act) const;
+ };
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct detach_all {
+ typedef typename fusion::result_of::for_each<Sequence, fct::detach>::type type;
+ };
+ }
+
+ template <typename Sequence>
+ void detach_all(Sequence& t);
+
+
+ }
+ } // namespace boost
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/join_all.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct join {
+ typedef void result_type;
+ template<typename ACT>
+ void operator()(ACT& act) const;
+ };
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct join_all {
+ typedef typename fusion::result_of::for_each<Sequence, fct::join>::type type;
+ };
+ }
+
+ template <typename Sequence>
+ typename result_of::join_all<Sequence>::type
+ join_all(Sequence& t);
+
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/join_all_until.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct join_until {
+ join_until(const system_time& abs_time);
+ template<typename ACT>
+ bool operator()(ACT& act) const;
+ };
+
+ struct join_for {
+ template <typename Duration>
+ join_for(const Duration& rel_time);
+ template<typename ACT>
+ bool operator()(ACT& act) const;
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct join_all_until {
+ typedef bool type;
+ };
+
+ template <typename Sequence>
+ struct join_all_for {
+ typedef bool type;
+ };
+ }
+
+ template <typename Sequence>
+ typename result_of::join_all_until<Sequence>
+ join_all_until(Sequence& t, const system_time& abs_time);
+
+ template <typename Sequence, typename Duration>
+ typename result_of::join_all_for<Sequence>
+ join_all_for(Sequence& t, const Duration& rel_time);
+
+ }
+ } // namespace boost
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/interrupt_all.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct interrupt {
+ template<typename ACT>
+ void operator()(ACT& act) const;
+ };
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct interrupt_all {
+ typedef typename fusion::result_of::for_each<Sequence, fct::interrupt>::type type;
+ };
+ }
+
+ template <typename Sequence>
+ void interrupt_all(Sequence& t);
+
+ }
+ }
+
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/interruption_requested_all.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct interruption_requested {
+ typedef bool result_type;
+
+ template<typename ACT>
+ bool operator()(ACT& act) const;
+ };
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct interruption_requested_on_all {
+ typedef typename fusion::result_of::all<Sequence, fct::interruption_requested>::type type;
+ };
+ }
+
+ template <typename Sequence>
+ bool interruption_requested_on_all(Sequence& t);
+
+ }
+ }
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/wait_all.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+
+ namespace fct {
+ struct wait {
+ typedef void result_type;
+ template<typename ACT>
+ void operator()(ACT& act) const;
+ };
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct wait_all {
+ typedef typename fusion::result_of::for_each<Sequence, fct::wait>::type type;
+ };
+ }
+
+ template <typename Sequence>
+ typename result_of::wait_all<Sequence>::type
+ wait_all(Sequence& t);
+
+ }
+ } // namespace boost
+
+
+[endsect]
+[/==========================================================================================]
+[section Header `<boost/interthreads/algorithm/wait_all_until.hpp>`]
+[/==========================================================================================]
+
+namespace boost {
+namespace interthreads {
+
+ namespace fct {
+ struct wait_until {
+ wait_until(const system_time& abs_time);
+ template<typename ACT>
+ bool operator()(ACT& act) const;
+
+ struct wait_for {
+ template <typename Duration>
+ wait_for(const Duration& rel_time);
+ template<typename ACT>
+ bool operator()(ACT& act) const;
+ }
+
+ namespace result_of {
+ template <typename Sequence>
+ struct wait_all_until {
+ typedef bool type;
+ };
+
+ template <typename Sequence>
+ struct wait_all_for {
+ typedef bool type;
+ };
+ }
+
+ template <typename Sequence>
+ typename result_of::wait_all_until<Sequence const>
+ wait_all_until(Sequence const& t, const system_time& abs_time);
+
+ template <typename Sequence, typename Duration>
+ typename result_of::wait_all_for<Sequence>
+ wait_all_for(Sequence& t, const Duration& rel_time);
+
+}
+} // namespace boost
+
+[endsect]
+
+[/==========================================================================================]
 [section Header `<boost/interthreads/wait_for_all.hpp>`]
 [/==========================================================================================]
 
@@ -1130,7 +1670,7 @@
 
 [endsect]
 
-[section:swap Member function `swap()`]
+[section:swap2 Member function `swap()`]
 
     void swap(shared_joiner& other);
 
@@ -1232,7 +1772,7 @@
 
 
 
-[section:joinable Member function `joinable()`]
+[section:joinable2 Member function `joinable()`]
 [/==========================================================================================]
 
     bool joinable() const;
@@ -1244,7 +1784,7 @@
 
 [endsect]
 
-[section:join Member function `join()`]
+[section:join2 Member function `join()`]
 [/==========================================================================================]
 
     void join();
@@ -1282,7 +1822,7 @@
 
 [endsect]
 
-[section:detach Member function `detach()`]
+[section:detach3 Member function `detach()`]
 [/==========================================================================================]
 
     void detach();
@@ -1296,7 +1836,7 @@
 [endsect]
 
 
-[section:get_id Member function `get_id()`]
+[section:get_id2 Member function `get_id()`]
 [/==========================================================================================]
 
     thread::id get_id() const;
@@ -1309,7 +1849,7 @@
 
 [endsect]
 
-[section:interrupt Member function `interrupt()`]
+[section:interrupt2 Member function `interrupt()`]
 [/==========================================================================================]
 
     void interrupt();
@@ -1325,7 +1865,7 @@
 [endsect]
 
 
-[section:nativehandle Member function `native_handle()`]
+[section:nativehandle2 Member function `native_handle()`]
 [/==========================================================================================]
 
     typedef platform-specific-type native_handle_type;
@@ -1342,7 +1882,7 @@
 
 
 [endsect]
-[section:non_member_swap Non-member function `swap()`]
+[section:non_member_swap2 Non-member function `swap()`]
 
     void swap(shared_joiner& lhs,shared_joiner& rhs);
 
@@ -1430,14 +1970,60 @@
 
 
 [/==========================================================================================]
-[section:decorator_thread_decoration_file Header `<boost/interthreads/thread_decorator.hpp>`]
+[section Header `<boost/interthreads/typeof/future.hpp>`]
+[/==========================================================================================]
+
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::unique_future, 1)
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::shared_future, 1)
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::promise, 1)
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::packaged_task, 1)
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/typeof/launcher.hpp>`]
+[/==========================================================================================]
+
+ BOOST_TYPEOF_REGISTER_TYPE(boost::interthreads::launcher)
+ BOOST_TYPEOF_REGISTER_TYPE(boost::interthreads::shared_launcher)
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/typeof/threader.hpp>`]
+[/==========================================================================================]
+
+ BOOST_TYPEOF_REGISTER_TYPE(boost::interthreads::unique_threader)
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::unique_joiner, 1)
+
+ BOOST_TYPEOF_REGISTER_TYPE(boost::interthreads::shared_threader)
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::interthreads::shared_joiner, 1)
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/typeof/basic_threader.hpp>`]
+[/==========================================================================================]
+
+ BOOST_TYPEOF_REGISTER_TYPE(boost::interthreads::basic_threader)
+
+[endsect]
+
+[/==========================================================================================]
+[section Header `<boost/interthreads/typeof/scheduler.hpp>`]
+[/==========================================================================================]
+[endsect]
+
+ BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tp::task, 1)
+
+
+[/==========================================================================================]
+[section:decorator_thread_decoration_file Header `<boost/interthreads/thread_decoration.hpp>`]
 [/==========================================================================================]
 
     namespace boost {
     namespace interthreads {
         class thread_decoration;
- class thread_decorator;
- void decorate();
     }
     }
 
@@ -1512,6 +2098,22 @@
 [endsect]
 [endsect]
 
+[endsect]
+
+
+
+[/==========================================================================================]
+[section:decorator_thread_decorator_file Header `<boost/interthreads/thread_decorator.hpp>`]
+[/==========================================================================================]
+
+ namespace boost {
+ namespace interthreads {
+ class thread_decorator;
+ void decorate();
+ }
+ }
+
+
 [section:thread_decorator Class `thread_decorator`]
 [/==========================================================================================]
 


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