Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53757 - in sandbox/task/libs/task/doc: . html html/boost_task
From: oliver.kowalke_at_[hidden]
Date: 2009-06-08 15:38:20


Author: olli
Date: 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
New Revision: 53757
URL: http://svn.boost.org/trac/boost/changeset/53757

Log:
* documentation enhanced

Added:
   sandbox/task/libs/task/doc/async.qbk (contents, props changed)
   sandbox/task/libs/task/doc/execution_policy.qbk (contents, props changed)
   sandbox/task/libs/task/doc/html/boost_task/async.html (contents, props changed)
Text files modified:
   sandbox/task/libs/task/doc/acknowledgements.qbk | 2
   sandbox/task/libs/task/doc/as_sub_task.qbk | 22
   sandbox/task/libs/task/doc/boost_task.qbk | 9
   sandbox/task/libs/task/doc/boost_task.xml | 4089 ++++++++++++++++++++++-----------------
   sandbox/task/libs/task/doc/default_pool.qbk | 8
   sandbox/task/libs/task/doc/fork_join.qbk | 20
   sandbox/task/libs/task/doc/handle.qbk | 113
   sandbox/task/libs/task/doc/html/boost_task/appendices.html | 19
   sandbox/task/libs/task/doc/html/boost_task/as_sub_task.html | 25
   sandbox/task/libs/task/doc/html/boost_task/handle.html | 160 +
   sandbox/task/libs/task/doc/html/boost_task/motivation.html | 62
   sandbox/task/libs/task/doc/html/boost_task/new_thread.html | 42
   sandbox/task/libs/task/doc/html/boost_task/own_thread.html | 10
   sandbox/task/libs/task/doc/html/boost_task/pool.html | 126
   sandbox/task/libs/task/doc/html/boost_task/reference.html | 1741 ++++++++--------
   sandbox/task/libs/task/doc/html/boost_task/task.html | 52
   sandbox/task/libs/task/doc/html/boost_task/utilities.html | 14
   sandbox/task/libs/task/doc/html/index.html | 165 +
   sandbox/task/libs/task/doc/introduction.qbk | 42
   sandbox/task/libs/task/doc/new_thread.qbk | 24
   sandbox/task/libs/task/doc/overview.qbk | 92
   sandbox/task/libs/task/doc/own_thread.qbk | 4
   sandbox/task/libs/task/doc/pool.qbk | 9
   sandbox/task/libs/task/doc/ref_async.qbk | 20
   sandbox/task/libs/task/doc/ref_exceptions.qbk | 15
   sandbox/task/libs/task/doc/ref_handle.qbk | 118
   sandbox/task/libs/task/doc/ref_new_thread.qbk | 3
   sandbox/task/libs/task/doc/ref_own_thread.qbk | 3
   sandbox/task/libs/task/doc/ref_poolsize.qbk | 7
   sandbox/task/libs/task/doc/ref_scanns.qbk | 7
   sandbox/task/libs/task/doc/ref_stacksize.qbk | 7
   sandbox/task/libs/task/doc/ref_static_pool.qbk | 60
   sandbox/task/libs/task/doc/ref_task.qbk | 41
   sandbox/task/libs/task/doc/ref_utility.qbk | 4
   sandbox/task/libs/task/doc/ref_watermark.qbk | 14
   sandbox/task/libs/task/doc/scheduler.qbk | 15
   sandbox/task/libs/task/doc/shutdown.qbk | 20
   sandbox/task/libs/task/doc/task.qbk | 26
   sandbox/task/libs/task/doc/todo.qbk | 2
   39 files changed, 3976 insertions(+), 3236 deletions(-)

Modified: sandbox/task/libs/task/doc/acknowledgements.qbk
==============================================================================
--- sandbox/task/libs/task/doc/acknowledgements.qbk (original)
+++ sandbox/task/libs/task/doc/acknowledgements.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -8,7 +8,7 @@
 
 [section:acknowledgements Appendix B: Acknowledgments]
 
-I'd like to thank Vicente J. Botet Escriba for his comments on the implementation and Anthony Williams and Braddock Gaskill for their future libraries.
+I'd like to thank Vicente J. Botet Escriba for his contributions (default_pool, reschedule_until, sleep, yield) and Anthony Williams and Braddock Gaskill for their future libraries.
 
 
 [endsect]

Modified: sandbox/task/libs/task/doc/as_sub_task.qbk
==============================================================================
--- sandbox/task/libs/task/doc/as_sub_task.qbk (original)
+++ sandbox/task/libs/task/doc/as_sub_task.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -9,32 +9,16 @@
 [section:as_sub_task Execute as sub-task]
 
 __as_sub_task__ is a convenient way to execute a __sub_task__. If the parent task is executed inside a __thread_pool__ the __sub_task__ is put into the local-queue of the
-__worker_thread__ in the other case the __sub_task__ will be executed in a new thread.
+__worker_thread__ in the other case the __sub_task__ will be executed in a new thread. __as_sub_task__ is used as default __ep__ for __fn_async__,
 
 
 ``
         boost::task::handle< long > h(
                 boost::task::async(
- boost::task::as_sub_task(),
                         boost::task::make_task(
                                 fibonacci,
- 10) ) );
-``
-
-is equivalent to:
-
-
-``
- if ( boost::this_task::runs_in_pool() )
- {
- // put the sub-task into worker-threads local-queue
- }
- else
- {
- boost::task::async(
- boost::task::new_thread(),
- boost::task::make_task(...) );
- }
+ 10),
+ boost::task::as_sub_task() ) );
 ``
 
 

Added: sandbox/task/libs/task/doc/async.qbk
==============================================================================
--- (empty file)
+++ sandbox/task/libs/task/doc/async.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -0,0 +1,44 @@
+[/
+ Copyright Oliver Kowalke 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
+]
+
+
+[section:async Asynchronous execution]
+
+The function __fn_async__ passes the __task__ to the __ep__ which executes the __task__ (for this purpose __ep__ is
+required to provide `handle< R > operator()( task< R > tsk)`).
+__fn_async__ accepts two arguments - the first is an __task__ object and the second an __ep__. For the second argument
+__as_sub_task__ is used per default. The function returns a __handle__ which controls the submitted __task__.
+
+
+``
+ long fibonacci( long n)
+ {
+ if ( n == 0) return 0;
+ if ( n == 1) return 1;
+ long k1( 1), k2( 0);
+ for ( int i( 2); i <= n; ++i)
+ {
+ long tmp( k1);
+ k1 = k1 + k2;
+ k2 = tmp;
+ }
+ return k1;
+ }
+
+ void main()
+ {
+ boost::task::handle< long > h( // get handle associated with the task
+ boost::task::async(
+ boost::task::make_task( // compute fibonacci(10) asynchron
+ fibonacci,
+ 10) ) );
+ std::cout << "id == " << h.get_id() << "\n";
+ std::cout << "fibonacci(10) == " << h.get() << std::endl; // throws boost::task::task_interrupted
+ }
+``
+
+[endsect]

Modified: sandbox/task/libs/task/doc/boost_task.qbk
==============================================================================
--- sandbox/task/libs/task/doc/boost_task.qbk (original)
+++ sandbox/task/libs/task/doc/boost_task.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -24,6 +24,7 @@
 [def __boost_thread__ [@http://www.boost.org/libs/thread [*Boost.Thread]]]
 [def __boost_future__ [@http://www.justsoftwaresolutions.co.uk/threading/updated-implementation-of-c++-futures-3.html [*Boost.Future]]]
 
+[template link_async[link_text] [link boost_task.async [link_text]]]
 [template link_channel[link_text] [link boost_task.pool.channel [link_text]]]
 [template link_forkjoin[link_text] [link boost_task.pool.forkjoin [link_text]]]
 [template link_handle[link_text] [link boost_task.handle [link_text]]]
@@ -59,6 +60,9 @@
 [def __task_interrupted__ `boost::task::task_interrupted`]
 [def __unbounded_channel__ `boost::task::unbounded_channel`]
 
+[def __waitfor_all__ `boost::task::waitfor_all()`]
+[def __waitfor_any__ `boost::task::waitfor_any()`]
+
 [def __full_default_pool__ `boost::task::static_pool< boost::task::unbounded_channel< boost::task::fifo > >`]
 
 [def __fn_delay__ `boost::this_task::delay()`]
@@ -100,8 +104,8 @@
 [def __fn_wait_until__ `wait_until()`]
 
 [def __act__ ['asynchronous-completion-token]]
-[def __ae__ ['asynchronous-executor]]
-[def __aes__ ['asynchronous-executors]]
+[def __ep__ ['execution-policy]]
+[def __eps__ ['execution-policies]]
 [def __blocked__ ['blocked]]
 [def __callable__ ['callable]]
 [def __channel__ ['channel]]
@@ -127,6 +131,7 @@
 [include introduction.qbk]
 [include task.qbk]
 [include handle.qbk]
+[include async.qbk]
 [include own_thread.qbk]
 [include new_thread.qbk]
 [include pool.qbk]

Modified: sandbox/task/libs/task/doc/boost_task.xml
==============================================================================
--- sandbox/task/libs/task/doc/boost_task.xml (original)
+++ sandbox/task/libs/task/doc/boost_task.xml 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<library id="boost_task" name="Boost.Task" dirname="boost_task" last-revision="$Date: 2009/06/01 12:11:53 $"
+<library id="boost_task" name="Boost.Task" dirname="boost_task" last-revision="$Date: 2009/06/08 19:40:03 $"
  xmlns:xi="http://www.w3.org/2001/XInclude">
   <libraryinfo>
     <authorgroup>
@@ -84,16 +84,29 @@
               </listitem>
             </itemizedlist>
           </listitem>
+ <listitem>
+ <code><phrase role="identifier">get_future</phrase><phrase role="special">()</phrase></code>
+ returns reference to internal future
+ </listitem>
+ <listitem>
+ functions <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">waitfor_all</phrase><phrase role="special">()</phrase></code>/<code><phrase
+ role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">waitfor_any</phrase><phrase role="special">()</phrase></code>
+ to wait for all or any handles
+ </listitem>
         </itemizedlist>
       </listitem>
       <listitem>
         <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
         role="identifier">task</phrase><phrase role="special">::</phrase><phrase
         role="identifier">async</phrase><phrase role="special">()</phrase></code>,
- executes a task on behalf of <emphasis>asynchronous-executors</emphasis>
+ executes a task on behalf of <emphasis>execution-policies</emphasis> asynchronously
       </listitem>
       <listitem>
- <emphasis>asynchronous-executor</emphasis> models:
+ <emphasis>execution-policy</emphasis> models:
         <itemizedlist>
           <listitem>
             <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
@@ -122,14 +135,104 @@
           </listitem>
           <listitem>
             custom pool: task gets executed by a <emphasis>worker-thread</emphasis>
- of a custom <emphasis>thread-pool</emphasis>
+ of a custom <emphasis>thread-pool</emphasis> (for instance with priority
+ scheduling)
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <emphasis>thread-pools</emphasis> with work-stealing algorithm
+ </listitem>
+ <listitem>
+ support of forking and joining sub-tasks
+ <itemizedlist>
+ <listitem>
+ better performance
+ </listitem>
+ <listitem>
+ no deadlock because of inline-execution of sub-tasks
+ </listitem>
+ <listitem>
+ automatically detects if code runs in a <emphasis>thread-pool</emphasis>
+ so the appropriate mechanism for executing the sub-tasks is choosen
           </listitem>
         </itemizedlist>
       </listitem>
     </itemizedlist>
     <para>
- References
+ In order to use the classes and functions described here, you can either include
+ the specific headers specified by the descriptions of each class or function,
+ or include the master library header:
+ </para>
+ <para>
+
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
+</programlisting>
+ </para>
+ <para>
+ which includes all the other headers in turn.
+ </para>
+ <para>
+ Used namespaces are:
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase>
+<phrase role="keyword">namespace</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase>
+</programlisting>
+ </para>
+ <anchor id="boost_task.overview.example"/>
+ <bridgehead renderas="sect3">
+ <link linkend="boost_task.overview.example">Example</link>
+ </bridgehead>
+ <para>
+
+<programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">fibonacci</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">0</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">1</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="identifier">k1</phrase><phrase role="special">(</phrase> <phrase role="number">1</phrase><phrase role="special">),</phrase> <phrase role="identifier">k2</phrase><phrase role="special">(</phrase> <phrase role="number">0</phrase><phrase role="special">);</phrase>
+ <phrase role="keyword">for</phrase> <phrase role="special">(</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">(</phrase> <phrase role="number">2</phrase><phrase role="special">);</phrase> <phrase role="identifier">i</phrase> <phrase role="special">&lt;=</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase> <phrase role="special">++</phrase><phrase role="identifier">i</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">(</phrase> <phrase role="identifier">k1</phrase><phrase role="special">);</phrase>
+ <phrase role="identifier">k1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">k1</phrase> <phrase role="special">+</phrase> <phrase role="identifier">k2</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">k2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">k1</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
+ <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
+ <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h1: id == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h2: id == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h1: is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h2: is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">h1</phrase><phrase role="special">,</phrase> <phrase role="identifier">h2</phrase><phrase role="special">);</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h1: is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h2: is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h1: has value == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">has_value</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h2: has value == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">has_value</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h1: has exception == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">has_exception</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;h2: has exception == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">has_exception</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(5) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
     </para>
+ <anchor id="boost_task.overview.references"/>
+ <bridgehead renderas="sect3">
+ <link linkend="boost_task.overview.references">References</link>
+ </bridgehead>
     <itemizedlist>
       <listitem>
         N2185: Proposed Text for Parallel Task Execution <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2185.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2185.html>
@@ -145,6 +248,10 @@
         written by Hans-J. Boehm.
       </listitem>
       <listitem>
+ N2880: C++ object lifetime interactions with the threads API <ulink url="
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2880.html">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2880.html>
+ written by Hans-J. Boehm and Lawrence Crowl.
+ </listitem>
+ <listitem>
         <ulink url="
http://herbsutter.wordpress.com">'Sutter’s Mill'</ulink> by
         Herb Sutter
       </listitem>
@@ -160,17 +267,6 @@
         role="bold">Boost.Thread</emphasis></ulink>).
       </para>
     </note>
- <para>
- In order to use the classes and functions described here, you can either include
- the specific headers specified by the descriptions of each class or function,
- or include the master library header:
- </para>
-
-<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
-</programlisting>
- <para>
- which includes all the other headers in turn.
- </para>
     <anchor id="boost_task.overview.tested_platforms"/>
     <bridgehead renderas="sect3">
       <link linkend="boost_task.overview.tested_platforms">Tested Platforms</link>
@@ -190,9 +286,6 @@
         FreeBSD 7.2 (x86), GCC 4.2.1
       </listitem>
       <listitem>
- OpenSolaris 0811 (x86_64), SunCC 5.10
- </listitem>
- <listitem>
         Windows XP Professional (x86), MSVC 9.0
       </listitem>
     </itemizedlist>
@@ -203,7 +296,8 @@
     <itemizedlist>
       <listitem>
         download the sources form <ulink url="http://www.boostpro.com/vault/index.php">boost-vault</ulink>
- (section <emphasis>Concurrent Programing</emphasis>) or <ulink url="https://svn.boost.org/svn/boost/sandbox/task/">boost-sandbox</ulink>
+ (section <emphasis>Concurrent Programing</emphasis>) or the latest development
+ version from <ulink url="https://svn.boost.org/svn/boost/sandbox/task/">boost-sandbox</ulink>
       </listitem>
       <listitem>
         extract the archive into the boost-source directory
@@ -224,7 +318,7 @@
       To speed-up computer-bound work and/or increase the computation-throughput
       is a common motivation for parallelizing a program. Especially for interactive
       applications that have to process user input while performing some background
- tasks responsivness iss very important. Parallelizing a program requires partitioning
+ tasks responsivness is very important. Parallelizing a program requires partitioning
       the program into smaller chunks that can run in parallel. The code can scale
       as the hardware gets better without changing the code.
     </para>
@@ -246,7 +340,7 @@
     <para>
       <emphasis role="bold">Boost.Task</emphasis> provides a framework to utilize
       the available hardware and provide a way for efficient asynchronous processing
- of time consuming operations. The framework provides some <emphasis>asynchronous-executors</emphasis>,
+ of time consuming operations. The framework provides some <emphasis>execution-policies</emphasis>,
       like <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
       role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase></code>,
       in order to execute the task asynchronously in another execution context (<emphasis
@@ -260,11 +354,11 @@
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="comment">// dispatchs task
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
 </phrase> <phrase role="identifier">print</phrase><phrase role="special">,</phrase>
- <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
+ <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase><phrase role="special">}</phrase>
 </programlisting>
     </para>
     <para>
@@ -285,11 +379,11 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
 </phrase> <phrase role="identifier">echo</phrase><phrase role="special">,</phrase>
- <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// wait until task is finished and return the result
+ <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// wait until task is finished and return the result
 </phrase><phrase role="special">}</phrase>
 </programlisting>
     </para>
@@ -307,12 +401,12 @@
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// long runing task, to be executed asynchronously
+</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// long runing task, to be executed asynchronously
 </phrase> <phrase role="identifier">long_running</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">millisec</phrase><phrase role="special">(</phrase> <phrase role="number">500</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">interrupt</phrase><phrase role="special">();</phrase> <phrase role="comment">// interrupt execution of task
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">millisec</phrase><phrase role="special">(</phrase> <phrase role="number">500</phrase><phrase role="special">)</phrase> <phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">interrupt</phrase><phrase role="special">();</phrase> <phrase role="comment">// interrupt execution of task
 </phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// wait until task is finished, will throw an exeception
 </phrase><phrase role="special">}</phrase>
 </programlisting>
@@ -344,18 +438,20 @@
         <phrase role="special">{</phrase>
                 <phrase role="comment">// fork a sub-task calculating fibonacci(n-1)
 </phrase> <phrase role="identifier">h1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase><phrase role="special">::</phrase><phrase role="identifier">get_pool</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">1</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">cutof</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase><phrase role="special">::</phrase><phrase role="identifier">get_pool</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// fork a sub-task calculating fibonacci(n-2)
 </phrase> <phrase role="identifier">h2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase><phrase role="special">::</phrase><phrase role="identifier">get_pool</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">2</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">cutof</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase><phrase role="special">::</phrase><phrase role="identifier">get_pool</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// join the results of both sub-tasks
 </phrase> <phrase role="keyword">return</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">+</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">();</phrase>
         <phrase role="special">}</phrase>
@@ -363,14 +459,14 @@
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase> <phrase role="comment">// access the default thread-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
-</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
+</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
 </phrase> <phrase role="number">10</phrase><phrase role="special">,</phrase>
- <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// access the default thread-pool
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
     </para>
@@ -390,12 +486,12 @@
     <para>
       
 <programlisting><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase> <phrase role="comment">// sub-task executed in a new thread or inside
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// the thread-pool depending upon the parent
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// the thread-pool depending upon the parent
 </phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// task is executed inside a thread-pool or not
 </phrase> <phrase role="number">10</phrase><phrase role="special">,</phrase>
- <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-</programlisting>
+ <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// sub-task executed in a new thread or inside
+</phrase></programlisting>
     </para>
   </section>
   <section id="boost_task.task">
@@ -408,7 +504,7 @@
       role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase></code>
       represents a <emphasis>callable</emphasis> (provides <code><phrase role="keyword">operator</phrase><phrase
       role="special">()()</phrase></code>) object containing the unit of code to
- be execute by a <emphasis>asynchronous-executor</emphasis>. Function <code><phrase
+ be execute by a <emphasis>execution-policy</emphasis>. Function <code><phrase
       role="identifier">get_future</phrase><phrase role="special">()</phrase></code>
       returns a <emphasis>asynchronous-completion-token</emphasis> allowing to wait
       for the completion of the computation of the task, for getting the result of
@@ -586,11 +682,11 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
 </phrase> <phrase role="identifier">cooperative</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// throws boost::task::task_interrupted
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// throws boost::task::task_interrupted
 </phrase><phrase role="special">}</phrase>
 </programlisting>
     </para>
@@ -616,10 +712,10 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">void</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
-</phrase> <phrase role="identifier">throwing</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">wait</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// throws std::domain_error
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
+</phrase> <phrase role="identifier">throwing</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">wait</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// throws std::domain_error
 </phrase><phrase role="special">}</phrase>
 </programlisting>
     </para>
@@ -722,7 +818,7 @@
       Top-level tasks have no parent. A parent task can create child tasks when it
       creates another task by using <code><phrase role="identifier">boost</phrase><phrase
       role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">as_sub_task</phrase></code> as <emphasis>asynchronous-executor</emphasis>.
+ role="identifier">as_sub_task</phrase></code> as <emphasis>execution-policy</emphasis>.
       These children are implicitly treated as <emphasis>sub-tasks</emphasis> of
       the larger task. It is assumed that that <emphasis>sub-tasks</emphasis> can
       be executed in any order because only overall operation speed matters (enabling
@@ -744,18 +840,18 @@
         <phrase role="special">{</phrase>
                 <phrase role="comment">// submit a sub-task to pool calculating fibonacci(n-1)
 </phrase> <phrase role="identifier">h1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase> <phrase role="comment">// execute a sub-task
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">1</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// submit a sub-task to pool calculating fibonacci(n-2)
 </phrase> <phrase role="identifier">h2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase> <phrase role="comment">// execute a sub-task
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">2</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// calculate fibonacci(n) from the results of both sub-tasks
 </phrase> <phrase role="keyword">return</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">+</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">();</phrase>
         <phrase role="special">}</phrase>
@@ -763,14 +859,14 @@
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase> <phrase role="comment">// access the default thread-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
-</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
+</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
 </phrase> <phrase role="number">10</phrase><phrase role="special">,</phrase>
- <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// access the default thread-pool
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
     </para>
@@ -794,11 +890,12 @@
       <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
       role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase></code>
       represents an <emphasis>asynchronous-completion-token</emphasis>. It will be
- returned by <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase
- role="special">()</phrase></code> and is associated with the submitted <code><phrase
- role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase></code>.
+ returned by <link linkend="boost_task.async"><code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">async</phrase><phrase role="special">()</phrase></code></link>
+ and is associated with the submitted <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase></code>.
     </para>
     <anchor id="boost_task.handle.asynchronous_completion_token_interface"/>
     <bridgehead renderas="sect3">
@@ -808,13 +905,13 @@
     <para>
       <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
       role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase></code>
- implements an interface in order to check the state of computation and result
- transfer
+ implements an interface in order to check the state of computation and to transfer
+ the result.
     </para>
     <itemizedlist>
       <listitem>
         <code><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase></code>:
- return id of the associated task-id
+ return id of the associated <emphasis>task-id</emphasis>
       </listitem>
       <listitem>
         <code><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase></code>:
@@ -830,7 +927,7 @@
       </listitem>
       <listitem>
         <code><phrase role="identifier">get</phrase><phrase role="special">()</phrase></code>:
- return value-result
+ return value-result or throw the exception-result
       </listitem>
       <listitem>
         <code><phrase role="identifier">wait</phrase><phrase role="special">()</phrase></code>:
@@ -849,23 +946,15 @@
       
 <programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">fibonacci</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
 <phrase role="special">{</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_point</phrase><phrase role="special">();</phrase> <phrase role="comment">// interruption point
-</phrase>
         <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">0</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
         <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">1</phrase><phrase role="special">;</phrase>
         <phrase role="keyword">long</phrase> <phrase role="identifier">k1</phrase><phrase role="special">(</phrase> <phrase role="number">1</phrase><phrase role="special">),</phrase> <phrase role="identifier">k2</phrase><phrase role="special">(</phrase> <phrase role="number">0</phrase><phrase role="special">);</phrase>
         <phrase role="keyword">for</phrase> <phrase role="special">(</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">(</phrase> <phrase role="number">2</phrase><phrase role="special">);</phrase> <phrase role="identifier">i</phrase> <phrase role="special">&lt;=</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase> <phrase role="special">++</phrase><phrase role="identifier">i</phrase><phrase role="special">)</phrase>
         <phrase role="special">{</phrase>
- <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_requested</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="comment">// check if interruption was requested
-</phrase> <phrase role="keyword">return</phrase><phrase role="special">;</phrase>
-
                 <phrase role="keyword">long</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">(</phrase> <phrase role="identifier">k1</phrase><phrase role="special">);</phrase>
                 <phrase role="identifier">k1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">k1</phrase> <phrase role="special">+</phrase> <phrase role="identifier">k2</phrase><phrase role="special">;</phrase>
                 <phrase role="identifier">k2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">;</phrase>
         <phrase role="special">}</phrase>
-
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_point</phrase><phrase role="special">();</phrase> <phrase role="comment">// interruption point
-</phrase>
         <phrase role="keyword">return</phrase> <phrase role="identifier">k1</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 
@@ -873,10 +962,10 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;id == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
         <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">wait</phrase><phrase role="special">();</phrase>
@@ -890,6 +979,31 @@
     <bridgehead renderas="sect3">
       <link linkend="boost_task.handle.task_interruption">Task interruption</link>
     </bridgehead>
+ <para>
+ Each invokation of <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase
+ role="special">()</phrase></code> returns an <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">handle</phrase></code> which allows to control the associated
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase></code>
+ (passed to <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase
+ role="special">()</phrase></code>). This includes the ability to interrupt
+ an <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase></code>
+ if it is cooperative. Cooperative means that the <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase></code> contains <emphasis>interruption-points</emphasis>
+ or checks for interruption requests
+ <footnote>
+ <para>
+ see <ulink url="http://www.ddj.com/architect/207100682">'Interrupt Politely'</ulink>,
+ Herb Sutter
+ </para>
+ </footnote>
+ .
+ </para>
     <itemizedlist>
       <listitem>
         <code><phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase></code>:
@@ -918,7 +1032,7 @@
         role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
         role="identifier">task</phrase><phrase role="special">::</phrase><phrase
         role="identifier">task</phrase></code> was removed from <emphasis>worker-thread</emphasis>
- or time point has elapsed
+ or time point has reached
       </listitem>
       <listitem>
         <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
@@ -932,7 +1046,7 @@
 <programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">cooperative</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_point</phrase><phrase role="special">();</phrase> <phrase role="comment">// interruption point
-</phrase>
+</phrase>
         <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">0</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
         <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">1</phrase><phrase role="special">;</phrase>
         <phrase role="keyword">long</phrase> <phrase role="identifier">k1</phrase><phrase role="special">(</phrase> <phrase role="number">1</phrase><phrase role="special">),</phrase> <phrase role="identifier">k2</phrase><phrase role="special">(</phrase> <phrase role="number">0</phrase><phrase role="special">);</phrase>
@@ -940,26 +1054,26 @@
         <phrase role="special">{</phrase>
                 <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_requested</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="comment">// check if interruption was requested
 </phrase> <phrase role="keyword">return</phrase><phrase role="special">;</phrase>
-
+
                 <phrase role="keyword">long</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">(</phrase> <phrase role="identifier">k1</phrase><phrase role="special">);</phrase>
                 <phrase role="identifier">k1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">k1</phrase> <phrase role="special">+</phrase> <phrase role="identifier">k2</phrase><phrase role="special">;</phrase>
                 <phrase role="identifier">k2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">;</phrase>
         <phrase role="special">}</phrase>
-
+
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_thread</phrase><phrase role="special">::</phrase><phrase role="identifier">interruption_point</phrase><phrase role="special">();</phrase> <phrase role="comment">// interruption point
-</phrase>
+</phrase>
         <phrase role="keyword">return</phrase> <phrase role="identifier">k1</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
+</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// task, to be executed asynchronously
 </phrase> <phrase role="identifier">cooperative</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">interrupt_and_wait</phrase><phrase role="special">();</phrase>
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// asynchronous executor
+</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">interrupt_and_wait</phrase><phrase role="special">();</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;id == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;is ready == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;has value == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">boolalpha</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">has_value</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
@@ -968,6 +1082,150 @@
 </phrase><phrase role="special">}</phrase>
 </programlisting>
     </para>
+ <note>
+ <para>
+ If the task is still pending when an interruption is requested - the task
+ is not removed from the queue, it is marked to be interrupted instead.
+ </para>
+ </note>
+ <anchor id="boost_task.handle.waiting_for_handles"/>
+ <bridgehead renderas="sect3">
+ <link linkend="boost_task.handle.waiting_for_handles">Waiting for handles</link>
+ </bridgehead>
+ <para>
+ <emphasis role="bold">Boost.Task</emphasis> provides function <code><phrase
+ role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">waitfor_all</phrase><phrase
+ role="special">()</phrase></code> waits for all handles passed to this function
+ to become ready
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">vector</phrase> <phrase role="identifier">handles</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">results</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">reserve</phrase><phrase role="special">(</phrase> <phrase role="number">10</phrase><phrase role="special">);</phrase>
+
+ <phrase role="keyword">for</phrase> <phrase role="special">(</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase> <phrase role="identifier">i</phrase> <phrase role="special">&lt;</phrase> <phrase role="number">10</phrase><phrase role="special">;</phrase> <phrase role="special">++</phrase><phrase role="identifier">i</phrase><phrase role="special">)</phrase>
+ <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">push_back</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
+ <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
+ <phrase role="comment">// wait until all tasks are ready
+</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">begin</phrase><phrase role="special">(),</phrase> <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">end</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+
+ <phrase role="keyword">int</phrase> <phrase role="identifier">k</phrase> <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">vector</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">iterator</phrase> <phrase role="identifier">e</phrase><phrase role="special">(</phrase> <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">end</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+ <phrase role="keyword">for</phrase> <phrase role="special">(</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">vector</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">iterator</phrase> <phrase role="identifier">i</phrase><phrase role="special">(</phrase> <phrase role="identifier">results</phrase><phrase role="special">.</phrase><phrase role="identifier">begin</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">i</phrase> <phrase role="special">!=</phrase> <phrase role="identifier">e</phrase><phrase role="special">;</phrase>
+ <phrase role="special">++</phrase><phrase role="identifier">i</phrase><phrase role="special">)</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">k</phrase><phrase role="special">++</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">i</phrase><phrase role="special">-&gt;</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ and <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">waitfor_any</phrase><phrase
+ role="special">()</phrase></code> which returns if at least one of the passed
+ handles becomes ready.
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">cooperative</phrase><phrase role="special">,</phrase>
+ <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">cooperative</phrase><phrase role="special">,</phrase>
+ <phrase role="number">7</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h3</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">cooperative</phrase><phrase role="special">,</phrase>
+ <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
+ <phrase role="comment">// wait for any task becomes ready
+</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">h1</phrase><phrase role="special">,</phrase> <phrase role="identifier">h2</phrase><phrase role="special">,</phrase> <phrase role="identifier">h3</phrase><phrase role="special">);</phrase>
+
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(7) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">h3</phrase><phrase role="special">.</phrase><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(5) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h3</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="boost_task.async">
+ <title><link linkend="boost_task.async"> Asynchronous execution</link></title>
+ <para>
+ The function <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase
+ role="special">()</phrase></code> passes the <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase></code> to the <emphasis>execution-policy</emphasis>
+ which executes the <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase></code>
+ (for this purpose <emphasis>execution-policy</emphasis> is required to provide
+ <code><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase>
+ <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
+ <phrase role="keyword">operator</phrase><phrase role="special">()(</phrase>
+ <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase>
+ <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
+ <phrase role="identifier">tsk</phrase><phrase role="special">)</phrase></code>).
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase
+ role="special">()</phrase></code> accepts two arguments - the first is an
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase></code>
+ object and the second an <emphasis>execution-policy</emphasis>. For the second
+ argument <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase></code>
+ is used per default. The function returns a <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">handle</phrase></code> which controls the submitted <code><phrase
+ role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase></code>.
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">fibonacci</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">0</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">n</phrase> <phrase role="special">==</phrase> <phrase role="number">1</phrase><phrase role="special">)</phrase> <phrase role="keyword">return</phrase> <phrase role="number">1</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="identifier">k1</phrase><phrase role="special">(</phrase> <phrase role="number">1</phrase><phrase role="special">),</phrase> <phrase role="identifier">k2</phrase><phrase role="special">(</phrase> <phrase role="number">0</phrase><phrase role="special">);</phrase>
+ <phrase role="keyword">for</phrase> <phrase role="special">(</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">i</phrase><phrase role="special">(</phrase> <phrase role="number">2</phrase><phrase role="special">);</phrase> <phrase role="identifier">i</phrase> <phrase role="special">&lt;=</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase> <phrase role="special">++</phrase><phrase role="identifier">i</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="keyword">long</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">(</phrase> <phrase role="identifier">k1</phrase><phrase role="special">);</phrase>
+ <phrase role="identifier">k1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">k1</phrase> <phrase role="special">+</phrase> <phrase role="identifier">k2</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">k2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">tmp</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">k1</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+
+<phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// get handle associated with the task
+</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// compute fibonacci(10) asynchron
+</phrase> <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
+ <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;id == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase> <phrase role="comment">// throws boost::task::task_interrupted
+</phrase><phrase role="special">}</phrase>
+</programlisting>
+ </para>
   </section>
   <section id="boost_task.own_thread">
     <title><link linkend="boost_task.own_thread"> Execute in own thread</link></title>
@@ -998,10 +1256,10 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">own_thread</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">own_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
@@ -1015,17 +1273,12 @@
       creates a new <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
       role="identifier">thread</phrase></code> and executes the task in this thread
       (asynchronous). The created thread gets joined by handle (so <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2802.html">N2802</ulink>
- should be addressed).
+ should be addressed). The returned <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">handle</phrase></code> joins the thread in its destructor
+ (if the last reference gets out of scope) and thus provides one possible solution
+ of <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2880.html">N2880</ulink>.
     </para>
- <caution>
- <para>
- Always store the returned <emphasis>asynchronous-completion-token</emphasis>
- in a variable because <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">handle</phrase></code>
- joins the thread in its destructor (if the last reference gets out of scope).
- </para>
- </caution>
     <para>
       
 <programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">fibonacci</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
@@ -1046,14 +1299,23 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
     </para>
+ <caution>
+ <para>
+ Always store the returned <emphasis>asynchronous-completion-token</emphasis>
+ in a variable because <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">handle</phrase></code>
+ joins the thread in its destructor (if the last reference gets out of scope).
+ </para>
+ </caution>
     <para>
       In the example below both <code><phrase role="identifier">a_function</phrase><phrase
       role="special">()</phrase></code> and <code><phrase role="identifier">another_function</phrase><phrase
@@ -1065,14 +1327,12 @@
     <para>
       
 <programlisting><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">a_function</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">a_function</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+
 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">another_function</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">another_function</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
 </programlisting>
     </para>
   </section>
@@ -1110,10 +1370,10 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">echo</phrase><phrase role="special">,</phrase>
- <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
@@ -1139,14 +1399,13 @@
 <phrase role="special">{</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">echo</phrase><phrase role="special">,</phrase>
- <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="string">&quot;Hello World!&quot;</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
- .
     </para>
     <important>
       <para>
@@ -1315,14 +1574,14 @@
 </phrase><phrase role="special">&gt;</phrase> <phrase role="identifier">pool</phrase><phrase role="special">(</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">poolsize</phrase><phrase role="special">(</phrase> <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
 
 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// thread-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">some_fn</phrase><phrase role="special">),</phrase> <phrase role="comment">// task to be executed
-</phrase> <phrase role="number">5</phrase><phrase role="special">);</phrase> <phrase role="comment">// priority is 5
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">some_fn</phrase><phrase role="special">),</phrase> <phrase role="comment">// task to be executed
+</phrase> <phrase role="number">5</phrase><phrase role="special">,</phrase> <phrase role="comment">// priority is 5
+</phrase> <phrase role="identifier">pool</phrase><phrase role="special">);</phrase> <phrase role="comment">// thread-pool
 </phrase>
 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// thread-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">another_fn</phrase><phrase role="special">),</phrase> <phrase role="comment">// task to be executed
-</phrase> <phrase role="number">3</phrase><phrase role="special">);</phrase> <phrase role="comment">// priority is 3
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">another_fn</phrase><phrase role="special">),</phrase> <phrase role="comment">// task to be executed
+</phrase> <phrase role="number">3</phrase><phrase role="special">,</phrase> <phrase role="comment">// priority is 3
+</phrase> <phrase role="identifier">pool</phrase><phrase role="special">);</phrase> <phrase role="comment">// thread-pool
 </phrase></programlisting>
       </para>
       <para>
@@ -1407,16 +1666,17 @@
         <phrase role="comment">// replaced by later task with same attribute == 2
 </phrase> <phrase role="comment">// if still pending in pool
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
- <phrase role="number">2</phrase><phrase role="special">);</phrase> <phrase role="comment">// attribute is 2
-</phrase>
+ <phrase role="number">2</phrase><phrase role="special">,</phrase> <phrase role="comment">// attribute is 2
+</phrase> <phrase role="identifier">pool</phrase><phrase role="special">);</phrase>
+
         <phrase role="comment">// will replace previous pending task with attribute == 2
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">pool</phrase><phrase role="special">,</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">),</phrase>
- <phrase role="number">2</phrase><phrase role="special">);</phrase> <phrase role="comment">// attribute is 2 too
-</phrase><phrase role="special">}</phrase>
+ <phrase role="number">2</phrase><phrase role="special">,</phrase> <phrase role="comment">// attribute is 2 too
+</phrase> <phrase role="identifier">pool</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
 </programlisting>
       </para>
     </section>
@@ -1442,12 +1702,6 @@
         are joined until all pending tasks are processed. No futher tasks can be
         submitted.
       </para>
- <note>
- <para>
- The deconstructor calls <code><phrase role="identifier">shutdown</phrase><phrase
- role="special">()</phrase></code> if the pool was not shutdown yet.
- </para>
- </note>
       <para>
         
 <programlisting><phrase role="keyword">long</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">(</phrase> <phrase role="keyword">long</phrase> <phrase role="identifier">n</phrase><phrase role="special">)</phrase>
@@ -1478,14 +1732,14 @@
 
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase>
         <phrase role="identifier">pool</phrase><phrase role="special">.</phrase><phrase role="identifier">shutdown</phrase><phrase role="special">();</phrase>
 
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
@@ -1493,6 +1747,12 @@
 <phrase role="special">}</phrase>
 </programlisting>
       </para>
+ <note>
+ <para>
+ The deconstructor calls <code><phrase role="identifier">shutdown</phrase><phrase
+ role="special">()</phrase></code> if the pool was not shutdown yet.
+ </para>
+ </note>
       <anchor id="boost_task.pool.pool_shutdown.shutdown_immediatly"/>
       <bridgehead renderas="sect4">
         <link linkend="boost_task.pool.pool_shutdown.shutdown_immediatly">Shutdown
@@ -1533,14 +1793,14 @@
 
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">,</phrase> <phrase role="comment">// asynchronous executor
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy
+</phrase>
         <phrase role="identifier">pool</phrase><phrase role="special">.</phrase><phrase role="identifier">shutdown_now</phrase><phrase role="special">();</phrase>
 
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase> <phrase role="comment">// may throw broken_task or task_interrupted
@@ -1596,14 +1856,14 @@
 
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor == default-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy == default-pool
+</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">(</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase> <phrase role="comment">// asynchronous executor == default-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">fibonacci_fn</phrase><phrase role="special">,</phrase> <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// execution-policy == default-pool
+</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(10) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h1</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
         <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;fibonacci(5) == &quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h2</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
@@ -1760,18 +2020,20 @@
         <phrase role="special">{</phrase>
                 <phrase role="comment">// fork a sub-task calculating fibonacci(n-1)
 </phrase> <phrase role="identifier">h1</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">1</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">cutof</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// fork a sub-task calculating fibonacci(n-2)
 </phrase> <phrase role="identifier">h2</phrase> <phrase role="special">=</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase>
                         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                                 <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase>
                                 <phrase role="identifier">n</phrase> <phrase role="special">-</phrase> <phrase role="number">2</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">cutof</phrase><phrase role="special">)</phrase> <phrase role="special">);</phrase>
+ <phrase role="identifier">cutof</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">()</phrase> <phrase role="special">);</phrase>
+
                 <phrase role="comment">// join the results of both sub-tasks
 </phrase> <phrase role="comment">// if one of the both sub-tasks is not ready
 </phrase> <phrase role="comment">// the worker-thread does not block, it executes other
@@ -1782,14 +2044,14 @@
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase> <phrase role="comment">// handle for fibonacci calculation
 </phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">(),</phrase> <phrase role="comment">// access the default thread-pool
-</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
-</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="comment">// calculate fibonacci number 10
+</phrase> <phrase role="identifier">parallel_fib</phrase><phrase role="special">,</phrase> <phrase role="comment">// for numbers &lt; 5 do inline recursive calculation
 </phrase> <phrase role="number">10</phrase><phrase role="special">,</phrase>
- <phrase role="number">5</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="number">5</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">default_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase> <phrase role="comment">// access the default thread-pool
+</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">.</phrase><phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
 <phrase role="special">}</phrase>
 </programlisting>
       </para>
@@ -1804,32 +2066,20 @@
       task is executed inside a <emphasis>thread-pool</emphasis> the <emphasis>sub-task</emphasis>
       is put into the local-queue of the <emphasis>worker-thread</emphasis> in the
       other case the <emphasis>sub-task</emphasis> will be executed in a new thread.
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase></code>
+ is used as default <emphasis>execution-policy</emphasis> for <code><phrase
+ role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">()</phrase></code>,
     </para>
     <para>
       
 <programlisting><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">long</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">h</phrase><phrase role="special">(</phrase>
         <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">(),</phrase>
                 <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(</phrase>
                         <phrase role="identifier">fibonacci</phrase><phrase role="special">,</phrase>
- <phrase role="number">10</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
-</programlisting>
- </para>
- <para>
- is equivalent to:
- </para>
- <para>
-
-<programlisting><phrase role="keyword">if</phrase> <phrase role="special">(</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">this_task</phrase><phrase role="special">::</phrase><phrase role="identifier">runs_in_pool</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase>
-<phrase role="special">{</phrase>
- <phrase role="comment">// put the sub-task into worker-threads local-queue
-</phrase><phrase role="special">}</phrase>
-<phrase role="keyword">else</phrase>
-<phrase role="special">{</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">new_thread</phrase><phrase role="special">(),</phrase>
- <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">make_task</phrase><phrase role="special">(...)</phrase> <phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
+ <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">task</phrase><phrase role="special">::</phrase><phrase role="identifier">as_sub_task</phrase><phrase role="special">()</phrase> <phrase role="special">)</phrase> <phrase role="special">);</phrase>
 </programlisting>
     </para>
   </section>
@@ -1982,123 +2232,165 @@
         <phrase role="keyword">void</phrase> <phrase role="identifier">swap</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">other</phrase><phrase role="special">)</phrase> <phrase role="comment">// throw();
 </phrase>
         <phrase role="keyword">void</phrase> <phrase role="keyword">operator</phrase><phrase role="special">()()</phrase> <phrase role="comment">// throw();
-</phrase><phrase role="special">}</phrase>
+</phrase><phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Fn</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A0</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">Fn</phrase> <phrase role="identifier">fn</phrase><phrase role="special">,</phrase> <phrase role="identifier">A0</phrase> <phrase role="identifier">a0</phrase><phrase role="special">);</phrase>
+
+<phrase role="special">...</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Fn</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A0</phrase><phrase role="special">,</phrase> <phrase role="special">...,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A10</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">Fn</phrase> <phrase role="identifier">fn</phrase><phrase role="special">,</phrase> <phrase role="identifier">A0</phrase> <phrase role="identifier">a0</phrase><phrase role="special">,</phrase> <phrase role="special">...,</phrase> <phrase role="identifier">A10</phrase> <phrase role="identifier">a10</phrase><phrase role="special">);</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.task.constructor">
- <title><link linkend="boost_task.reference.task.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.task.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Fn</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">task</phrase><phrase role="special">(</phrase> <phrase role="identifier">Fn</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">fn</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">tp</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">&lt;</phrase> <phrase role="identifier">R</phrase>
- <phrase role="special">&gt;</phrase></code> from a function object
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.task.get_id">
- <title><link linkend="boost_task.reference.task.get_id"> Member function
- <code><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">tp</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">&lt;</phrase>
+ <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase></code>
+ from a function object
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.task.function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_">function
+ <code><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">const</phrase> <phrase role="identifier">id</phrase> <phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns task identifier
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.task.get_future">
- <title><link linkend="boost_task.reference.task.get_future"> Member function
- <code><phrase role="identifier">get_future</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns task identifier
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.task.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">get_future</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">shared_future</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">get_future</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns a future assiciated with the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- ???
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.task.swap">
- <title><link linkend="boost_task.reference.task.swap"> Member function <code><phrase
- role="identifier">swap</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns a future assiciated with the task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ ???
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.task.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">swap</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">swap</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">other</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- swaps the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.task.operator">
- <title><link linkend="boost_task.reference.task.operator"> Member function
- <code><phrase role="keyword">operator</phrase><phrase role="special">()()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ swaps the task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.task.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special________phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special________phrase___code_">Member
+ function <code><phrase role="keyword">operator</phrase><phrase role="special">()()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="keyword">operator</phrase><phrase role="special">()()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes tasks internal function object
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes tasks internal function object
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.task.free_function__code__phrase_role__identifier__make_task__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task.free_function__code__phrase_role__identifier__make_task__phrase__phrase_role__special______phrase___code_">Free
+ function <code><phrase role="identifier">make_task</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Fn</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A0</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">Fn</phrase> <phrase role="identifier">fn</phrase><phrase role="special">,</phrase> <phrase role="identifier">A0</phrase> <phrase role="identifier">a0</phrase><phrase role="special">);</phrase>
+
+<phrase role="special">...</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Fn</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A0</phrase><phrase role="special">,</phrase> <phrase role="special">...,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">A10</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;::</phrase><phrase role="identifier">type</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">make_task</phrase><phrase role="special">(</phrase> <phrase role="identifier">Fn</phrase> <phrase role="identifier">fn</phrase><phrase role="special">,</phrase> <phrase role="identifier">A0</phrase> <phrase role="identifier">a0</phrase><phrase role="special">,</phrase> <phrase role="special">...,</phrase> <phrase role="identifier">A10</phrase> <phrase role="identifier">a10</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ creates an task from function object and arguments
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.handle">
       <title><link linkend="boost_task.reference.handle"> Class template <code><phrase
@@ -2135,400 +2427,537 @@
 
         <phrase role="keyword">void</phrase> <phrase role="identifier">wait</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase><phrase role="special">;</phrase>
 
+ <phrase role="identifier">shared_future</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">get_future</phrase><phrase role="special">();</phrase>
+
         <phrase role="keyword">void</phrase> <phrase role="identifier">swap</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">other</phrase><phrase role="special">);</phrase>
 <phrase role="special">};</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">begin</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">end</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <p
hrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <p
hrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t5</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">begin</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">end</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase
><phrase role="special">&lt;</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase
><phrase role="special">&lt;</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t5</phrase><phrase role="special">);</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.handle.constructor">
- <title><link linkend="boost_task.reference.handle.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.handle.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">handle</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs an empty (invalid) handle
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.get_id">
- <title><link linkend="boost_task.reference.handle.get_id"> Member function
- <code><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs an empty (invalid) handle
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">get_id</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">const</phrase> <phrase role="identifier">id</phrase> <phrase role="identifier">get_id</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns identifier of the associated task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.interruption_requested">
- <title><link linkend="boost_task.reference.handle.interruption_requested">
- Member function <code><phrase role="identifier">interruption_requested</phrase><phrase
- role="special">()</phrase></code></link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns identifier of the associated task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__interruption_requested__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__interruption_requested__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">interruption_requested</phrase><phrase
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">interruption_requested</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- checks if interruption is already requested
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.interrupt">
- <title><link linkend="boost_task.reference.handle.interrupt"> Member function
- <code><phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ checks if interruption is already requested
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- requests task interruption; doesn not block (immediatly returns)
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- ???
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.interrupt_and_wait">
- <title><link linkend="boost_task.reference.handle.interrupt_and_wait"> Member
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ requests task interruption; doesn not block (immediatly returns)
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ ???
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait__phrase__phrase_role__special______phrase___code_">Member
         function <code><phrase role="identifier">interrupt_and_wait</phrase><phrase
- role="special">()</phrase></code></link></title>
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">interrupt_and_wait</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- requests task interruption and blocks until worker-thread stops task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- ???
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.interrupt_and_wait_until">
- <title><link linkend="boost_task.reference.handle.interrupt_and_wait_until">
- Member function <code><phrase role="identifier">interrupt_and_wait_until</phrase><phrase
- role="special">()</phrase></code></link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ requests task interruption and blocks until worker-thread stops task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ ???
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_until__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_until__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">interrupt_and_wait_until</phrase><phrase
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">interrupt_and_wait_until</phrase><phrase role="special">(</phrase> <phrase role="identifier">system_time</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">abs_time</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- requests task interruption and blocks until worker-thread stops task
- or time-point elapsed
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- ???
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.interrupt_and_wait_for">
- <title><link linkend="boost_task.reference.handle.interrupt_and_wait_for">
- Member function <code><phrase role="identifier">interrupt_and_wait_for</phrase><phrase
- role="special">()</phrase></code></link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ requests task interruption and blocks until worker-thread stops task
+ or time-point elapsed
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ ???
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_for__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_for__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">interrupt_and_wait_for</phrase><phrase
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Duration</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="keyword">void</phrase> <phrase role="identifier">interrupt_and_wait_for</phrase><phrase role="special">(</phrase> <phrase role="identifier">Duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">rel_time</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- requests task interruption and blocks until worker-thread stops task
- or time-duration elapsed
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- ???
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.get">
- <title><link linkend="boost_task.reference.handle.get"> Member function
- <code><phrase role="identifier">get</phrase><phrase role="special">()</phrase></code></link></title>
-
-<programlisting><phrase role="identifier">R</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase>
-</programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- requests the result
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- task_interrupted, task_uninialized
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.wait">
- <title><link linkend="boost_task.reference.handle.wait"> Member function
- <code><phrase role="identifier">wait</phrase><phrase role="special">()</phrase></code></link></title>
-
-<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">wait</phrase><phrase role="special">()</phrase>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ requests task interruption and blocks until worker-thread stops task
+ or time-duration elapsed
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ ???
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__get__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__get__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">get</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="identifier">R</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- blocks caller until task is done
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- task_interrupted, task_uninialized
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.is_ready">
- <title><link linkend="boost_task.reference.handle.is_ready"> Member function
- <code><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ requests the result
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ task_interrupted, task_uninialized
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__wait__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__wait__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">wait</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">wait</phrase><phrase role="special">()</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ blocks caller until task is done
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ task_interrupted, task_uninialized
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__is_ready__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__is_ready__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">is_ready</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- checks if task is done
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.has_value">
- <title><link linkend="boost_task.reference.handle.has_value"> Member function
- <code><phrase role="identifier">has_value</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ checks if task is done
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_value__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_value__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">has_value</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">has_value</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- checks if task is done and a result value is set
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.has_exception">
- <title><link linkend="boost_task.reference.handle.has_exception"> Member
- function <code><phrase role="identifier">has_exception</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ checks if task is done and a result value is set
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_exception__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_exception__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">has_exception</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">has_exception</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- checks if task is done and an exception is set
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.handle.swap">
- <title><link linkend="boost_task.reference.handle.swap"> Member function
- <code><phrase role="identifier">swap</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ checks if task is done and an exception is set
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">get_future</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="identifier">shared_future</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">get_future</phrase><phrase role="special">()</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns a reference to the internal shared_future&lt; R &gt;
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">swap</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">swap</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">other</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- swapps handle
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ swapps handle
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_all__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_all__phrase__phrase_role__special______phrase___code_">Non-member
+ function <code><phrase role="identifier">wait_for_all</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">begin</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">end</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <p
hrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">void</phrase> <phrase role="identifier">waitfor_all</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <p
hrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t5</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ waits for all handles to become ready
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_any__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_any__phrase__phrase_role__special______phrase___code_">Non-member
+ function <code><phrase role="identifier">wait_for_any</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">begin</phrase><phrase role="special">,</phrase> <phrase role="identifier">Iterator</phrase> <phrase role="identifier">end</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase
><phrase role="special">&lt;</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">);</phrase>
+
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T1</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T2</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T3</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T4</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="keyword">friend</phrase> <phrase role="keyword">unsigned</phrase> <phrase role="keyword">int</phrase> <phrase role="identifier">waitfor_any</phrase><phrase role="special">(</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T1</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t1</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T2</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t2</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T3</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t3</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase
><phrase role="special">&lt;</phrase> <phrase role="identifier">T4</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t4</phrase><phrase role="special">,</phrase> <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">T5</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">t5</phrase><phrase role="special">);</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ waits for any handle to become ready
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.async">
- <title><link linkend="boost_task.reference.async"> Function <code><phrase role="identifier">async</phrase><phrase
- role="special">()</phrase></code></link></title>
- <section id="boost_task.reference.async.async_default">
- <title><link linkend="boost_task.reference.async.async_default"> Templated
- non-member function <code><phrase role="identifier">async</phrase><phrase
- role="special">(</phrase> <phrase role="identifier">AE</phrase><phrase role="special">,</phrase>
- <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase>
- <phrase role="identifier">R</phrase> <phrase role="special">&gt;)</phrase></code></link></title>
- <para>
-
+ <title><link linkend="boost_task.reference.async"> Non-member function <code><phrase
+ role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase
+ role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;,</phrase>
+ <phrase role="identifier">EP</phrase><phrase role="special">)</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">async</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
-<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">AE</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
-<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">AE</phrase> <phrase role="identifier">ae</phrase><phrase role="special">,</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">);</phrase>
+<phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">EP</phrase> <phrase role="special">&gt;</phrase>
+<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">,</phrase> <phrase role="identifier">EP</phrase> <phrase role="identifier">ep</phrase><phrase role="special">);</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes task in an asyncrounous executer and returns a handle associated
- with the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.async.async_pool">
- <title><link linkend="boost_task.reference.async.async_pool"> Templated non-member
- function <code><phrase role="identifier">async</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase>
- <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase>
- <phrase role="special">&amp;,</phrase> <phrase role="identifier">task</phrase><phrase
- role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase
- role="special">&gt;)</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes task in an asyncrounous executer and returns a handle associated
+ with the task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.async1">
+ <title><link linkend="boost_task.reference.async1"> Non-member function <code><phrase
+ role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase
+ role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;,</phrase>
+ <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase>
+ <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase>
+ <phrase role="special">&amp;)</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">async</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase>
-<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">ae</phrase><phrase role="special">,</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">);</phrase>
+<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">,</phrase> <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">ep</phrase><phrase role="special">);</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes task in a thread-pool and returns a handle associated with
- the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.async.async_pool_attr">
- <title><link linkend="boost_task.reference.async.async_pool_attr"> Templated
- non-member function <code><phrase role="identifier">async</phrase><phrase
- role="special">(</phrase> <phrase role="identifier">pool</phrase><phrase
- role="special">&lt;</phrase> <phrase role="identifier">Channel</phrase>
- <phrase role="special">&gt;</phrase> <phrase role="special">&amp;,</phrase>
- <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase>
- <phrase role="identifier">R</phrase> <phrase role="special">&gt;,</phrase>
- <phrase role="identifier">Attr</phrase><phrase role="special">)</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes task in a thread-pool and returns a handle associated with the
+ task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.async2">
+ <title><link linkend="boost_task.reference.async2"> Non-member function <code><phrase
+ role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase
+ role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;,</phrase>
+ <phrase role="identifier">Attr</phrase><phrase role="special">,</phrase> <phrase
+ role="identifier">pool</phrase><phrase role="special">&lt;</phrase> <phrase
+ role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase> <phrase
+ role="special">&amp;)</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">async</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Channel</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Attr</phrase> <phrase role="special">&gt;</phrase>
-<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">ae</phrase><phrase role="special">,</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">,</phrase> <phrase role="identifier">Attr</phrase> <phrase role="identifier">attr</phrase><phrase role="special">);</phrase>
+<phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">async</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">,</phrase> <phrase role="identifier">Attr</phrase> <phrase role="identifier">attr</phrase><phrase role="special">,</phrase> <phrase role="identifier">pool</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">Channel</phrase> <phrase role="special">&gt;</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">ep</phrase><phrase role="special">);</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes atrributed task in a thread-pool and returns a handle associated
- with the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes atrributed task in a thread-pool and returns a handle associated
+ with the task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.own_thread">
       <title><link linkend="boost_task.reference.own_thread"> Class <code><phrase
@@ -2544,33 +2973,34 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.own_thread.operator">
- <title><link linkend="boost_task.reference.own_thread.operator"> Member function
- <code><phrase role="keyword">operator</phrase><phrase role="special">()(</phrase>
+ <anchor id="boost_task.reference.own_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.own_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_">Member
+ function <code><phrase role="keyword">operator</phrase><phrase role="special">()(</phrase>
         <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase>
         <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
- <phrase role="identifier">t</phrase><phrase role="special">)</phrase></code></link></title>
-
+ <phrase role="identifier">t</phrase><phrase role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="keyword">operator</phrase><phrase role="special">()(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes task in the current thread an returns an handle associated
- with the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes task in the current thread an returns an handle associated with
+ the task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.new_thread">
       <title><link linkend="boost_task.reference.new_thread"> Class <code><phrase
@@ -2586,33 +3016,34 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.new_thread.operator">
- <title><link linkend="boost_task.reference.new_thread.operator"> Member function
- <code><phrase role="keyword">operator</phrase><phrase role="special">()(</phrase>
+ <anchor id="boost_task.reference.new_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.new_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_">Member
+ function <code><phrase role="keyword">operator</phrase><phrase role="special">()(</phrase>
         <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase>
         <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
- <phrase role="identifier">t</phrase><phrase role="special">)</phrase></code></link></title>
-
+ <phrase role="identifier">t</phrase><phrase role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="keyword">operator</phrase><phrase role="special">()(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">t</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- executes task in a new thread an returns an handle associated with
- the task
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ executes task in a new thread an returns an handle associated with the
+ task
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.static_pool">
       <title><link linkend="boost_task.reference.static_pool"> Class template <code><phrase
@@ -2675,131 +3106,140 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.static_pool.constructor_unbounded_channel_hw">
- <title><link linkend="boost_task.reference.static_pool.constructor_unbounded_channel_hw">
- Constructor (unbounded channel)</link></title>
-<programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">time_duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">asleep</phrase> <phrase role="special">=</phrase> <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">microseconds</phrase><phrase role="special">(</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
- <phrase role="identifier">scanns</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">scns</phrase> <phrase role="special">=</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="number">20</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase>
-</programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- operating system provides functionality for processor pining
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a pool - for each processor a worker-thread is created and
- bound to one processor - global-queue can queue an unlimited number
- of tasks
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- constructor has to be called if a unbounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.constructor_unbounded_channel">
- <title><link linkend="boost_task.reference.static_pool.constructor_unbounded_channel">
- Constructor (unbounded channel)</link></title>
+ <anchor id="boost_task.reference.static_pool.constructor__unbounded_channel_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.constructor__unbounded_channel_">Constructor
+ (unbounded channel)</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
- <phrase role="identifier">poolsize</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">psize</phrase><phrase role="special">,</phrase>
         <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">time_duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">asleep</phrase> <phrase role="special">=</phrase> <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">microseconds</phrase><phrase role="special">(</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
         <phrase role="identifier">scanns</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">scns</phrase> <phrase role="special">=</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="number">20</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a pool containing psize worker-threads - global-queue can
- queue an unlimited number of tasks
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- constructor has to be called if a unbounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.constructor_bounded_channel_hw">
- <title><link linkend="boost_task.reference.static_pool.constructor_bounded_channel_hw">
- Constructor (bounded channel)</link></title>
-<programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ operating system provides functionality for processor pining
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a pool - for each processor a worker-thread is created and
+ bound to one processor - global-queue can queue an unlimited number of
+ tasks
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ constructor has to be called if a unbounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.constructor__unbounded_channel_poolsize_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.constructor__unbounded_channel_poolsize_">Constructor
+ (unbounded channel/poolsize)</link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">poolsize</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">psize</phrase><phrase role="special">,</phrase>
+ <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">time_duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">asleep</phrase> <phrase role="special">=</phrase> <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">microseconds</phrase><phrase role="special">(</phrase> <phrase role="number">10</phrase><phrase role="special">),</phrase>
+ <phrase role="identifier">scanns</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">scns</phrase> <phrase role="special">=</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="number">20</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase>
+</programlisting>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a pool containing psize worker-threads - global-queue can
+ queue an unlimited number of tasks
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ constructor has to be called if a unbounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.constructor__bounded_channel_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.constructor__bounded_channel_">Constructor
+ (bounded channel)</link>
+ </bridgehead>
+
+<programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
         <phrase role="identifier">high_watermark</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">hwm</phrase><phrase role="special">,</phrase>
         <phrase role="identifier">low_watermark</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">lwm</phrase><phrase role="special">,</phrase>
         <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">time_duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">asleep</phrase> <phrase role="special">=</phrase> <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">milliseconds</phrase><phrase role="special">(</phrase> <phrase role="number">100</phrase><phrase role="special">),</phrase>
         <phrase role="identifier">scanns</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">scns</phrase> <phrase role="special">=</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="number">20</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- operating system provides functionality for processor pining
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a pool - for each processor a worker-thread is created and
- bound to one processor - global-queue can only queue a limited number
- of tasks
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>,
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- Constructor has to be called if a bounded-channel is used.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.constructor_bounded_channel">
- <title><link linkend="boost_task.reference.static_pool.constructor_bounded_channel">
- Constructor (bounded channel)</link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ operating system provides functionality for processor pining
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a pool - for each processor a worker-thread is created and
+ bound to one processor - global-queue can only queue a limited number
+ of tasks
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>,
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ Constructor has to be called if a bounded-channel is used.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.constructor__bounded_channel_poolsize_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.constructor__bounded_channel_poolsize_">Constructor
+ (bounded channel/poolsize)</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">static_pool</phrase><phrase role="special">(</phrase>
         <phrase role="identifier">poolsize</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">psize</phrase><phrase role="special">,</phrase>
         <phrase role="identifier">high_watermark</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">hwm</phrase><phrase role="special">,</phrase>
@@ -2807,671 +3247,683 @@
         <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">time_duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">asleep</phrase> <phrase role="special">=</phrase> <phrase role="identifier">posix_time</phrase><phrase role="special">::</phrase><phrase role="identifier">milliseconds</phrase><phrase role="special">(</phrase> <phrase role="number">100</phrase><phrase role="special">),</phrase>
         <phrase role="identifier">scanns</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">scns</phrase> <phrase role="special">=</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="number">20</phrase><phrase role="special">)</phrase> <phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a pool containing psize worker-threads - global-queue can
- only queue a limited number of tasks
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>,
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- constructor has to be called if a bounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.destructor">
- <title><link linkend="boost_task.reference.static_pool.destructor"> Destructor</link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a pool containing psize worker-threads - global-queue can
+ only queue a limited number of tasks
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_scanns</phrase></code>, <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">task</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>,
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ constructor has to be called if a bounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.destructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.destructor">Destructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="special">~</phrase><phrase role="identifier">static_pool</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- calls <code><phrase role="special">:</phrase><phrase role="identifier">shutdown</phrase><phrase
- role="special">()</phrase></code> if not already called
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.size">
- <title><link linkend="boost_task.reference.static_pool.size"> Member function
- <code><phrase role="identifier">size</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ calls <code><phrase role="special">:</phrase><phrase role="identifier">shutdown</phrase><phrase
+ role="special">()</phrase></code> if not already called
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__size__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__size__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">size</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">size</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns how many worker-threads are running in the pool
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.active">
- <title><link linkend="boost_task.reference.static_pool.active"> Member function
- <code><phrase role="identifier">active</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns how many worker-threads are running in the pool
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__active__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__active__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">active</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">active</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns how many worker-threads are active (executing an task)
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.idle">
- <title><link linkend="boost_task.reference.static_pool.idle"> Member function
- <code><phrase role="identifier">idle</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns how many worker-threads are active (executing an task)
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__idle__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__idle__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">idle</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">idle</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns how many worker-threads are idle (not executing an task).
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- The value is the difference of <code><phrase role="identifier">size</phrase><phrase
- role="special">()</phrase></code> and <code><phrase role="identifier">active</phrase><phrase
- role="special">()</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.shutdown">
- <title><link linkend="boost_task.reference.static_pool.shutdown"> Member
- function <code><phrase role="identifier">shutdown</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns how many worker-threads are idle (not executing an task).
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ The value is the difference of <code><phrase role="identifier">size</phrase><phrase
+ role="special">()</phrase></code> and <code><phrase role="identifier">active</phrase><phrase
+ role="special">()</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">shutdown</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">shutdown</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- deactivates the channel and joins all worker-threads - the pool is
- closed
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- all pending tasks are processed
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.shutdown_now">
- <title><link linkend="boost_task.reference.static_pool.shutdown_now"> Member
- function <code><phrase role="identifier">shutdown_now</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ deactivates the channel and joins all worker-threads - the pool is closed
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ all pending tasks are processed
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown_now__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown_now__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">shutdown_now</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">shutdown_now</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- deactivates the channel, send interruption request to all worker-threads
- and joins them - the pool is closed
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- pending tasks are not processed but returned
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.losed">
- <title><link linkend="boost_task.reference.static_pool.losed"> Member function
- <code><phrase role="identifier">closed</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ deactivates the channel, send interruption request to all worker-threads
+ and joins them - the pool is closed
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ pending tasks are not processed but returned
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__closed__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__closed__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">closed</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">closed</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- queries if the pool is closed (pool is shutdown)
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.clear">
- <title><link linkend="boost_task.reference.static_pool.clear"> Member function
- <code><phrase role="identifier">clear</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ queries if the pool is closed (pool is shutdown)
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__clear__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__clear__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">clear</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">clear</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- removes all pending tasks from the channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.empty">
- <title><link linkend="boost_task.reference.static_pool.empty"> Member function
- <code><phrase role="identifier">empty</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ removes all pending tasks from the channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__empty__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__empty__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">empty</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">bool</phrase> <phrase role="identifier">empty</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- queries if the channel is empty
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.pending">
- <title><link linkend="boost_task.reference.static_pool.pending"> Member function
- <code><phrase role="identifier">pending</phrase><phrase role="special">()</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ queries if the channel is empty
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__pending__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__pending__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">pending</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">pending</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- queries how many tasks are pending (still unprocessed) in the global-queue
- (channel)
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.get_upper_bound">
- <title><link linkend="boost_task.reference.static_pool.get_upper_bound">
- Member function <code><phrase role="identifier">upper_bound</phrase><phrase
- role="special">()</phrase></code></link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ queries how many tasks are pending (still unprocessed) in the global-queue
+ (channel)
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">upper_bound</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">upper_bound</phrase><phrase role="special">()</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- channel is of type bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns the upper bound of the bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- can only be used if a bounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.set_upper_bound">
- <title><link linkend="boost_task.reference.static_pool.set_upper_bound">
- Member function <code><phrase role="identifier">upper_bound</phrase><phrase
- role="special">(</phrase> <phrase role="identifier">high_watermark</phrase>
- <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase>
- <phrase role="identifier">hwm</phrase><phrase role="special">)</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ channel is of type bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns the upper bound of the bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ can only be used if a bounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__high_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__hwm__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__high_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__hwm__phrase__phrase_role__special_____phrase___code_">Member
+ function <code><phrase role="identifier">upper_bound</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">high_watermark</phrase> <phrase role="keyword">const</phrase><phrase
+ role="special">&amp;</phrase> <phrase role="identifier">hwm</phrase><phrase
+ role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">upper_bound</phrase><phrase role="special">(</phrase> <phrase role="identifier">high_watermark</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">hwm</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- channel is of type bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- sets the upper bound of the bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Postconditions:</term>
- <listitem>
- <para>
- <code><phrase role="keyword">this</phrase><phrase role="special">-&gt;</phrase><phrase
- role="identifier">upper_bound</phrase><phrase role="special">()</phrase>
- <phrase role="special">==</phrase> <phrase role="identifier">hwm</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- can only be used if a bounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.get_lower_bound">
- <title><link linkend="boost_task.reference.static_pool.get_lower_bound">
- Member function <code><phrase role="identifier">lower_bound</phrase><phrase
- role="special">()</phrase></code></link></title>
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ channel is of type bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ sets the upper bound of the bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Postconditions:</term>
+ <listitem>
+ <para>
+ <code><phrase role="keyword">this</phrase><phrase role="special">-&gt;</phrase><phrase
+ role="identifier">upper_bound</phrase><phrase role="special">()</phrase>
+ <phrase role="special">==</phrase> <phrase role="identifier">hwm</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ can only be used if a bounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__lower_bound__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__lower_bound__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="identifier">lower_bound</phrase><phrase role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">lower_bound</phrase><phrase role="special">();</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- channel is of type bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns the lower bound of the bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- can only be used if a bounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.set_lower_bound">
- <title><link linkend="boost_task.reference.static_pool.set_lower_bound">
- Member function <code><phrase role="identifier">lower_bound</phrase><phrase
- role="special">(</phrase> <phrase role="identifier">low_watermark</phrase>
- <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase>
- <phrase role="identifier">lwm</phrase><phrase role="special">)</phrase></code></link></title>
-
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ channel is of type bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns the lower bound of the bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ can only be used if a bounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__lower_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__low_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__lwm__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__lower_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__low_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__lwm__phrase__phrase_role__special_____phrase___code_">Member
+ function <code><phrase role="identifier">lower_bound</phrase><phrase role="special">(</phrase>
+ <phrase role="identifier">low_watermark</phrase> <phrase role="keyword">const</phrase><phrase
+ role="special">&amp;</phrase> <phrase role="identifier">lwm</phrase><phrase
+ role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">lower_bound</phrase><phrase role="special">(</phrase> <phrase role="identifier">low_watermark</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">lwm</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- channel is of type bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- sets the lower bound of the bounded-channel
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Postconditions:</term>
- <listitem>
- <para>
- <code><phrase role="keyword">this</phrase><phrase role="special">-&gt;</phrase><phrase
- role="identifier">lower_bound</phrase><phrase role="special">()</phrase>
- <phrase role="special">==</phrase> <phrase role="identifier">lwm</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Notes:</term>
- <listitem>
- <para>
- can only be used if a bounded-channel is used
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.submit">
- <title><link linkend="boost_task.reference.static_pool.submit"> Member function
- <code><phrase role="identifier">submit</phrase><phrase role="special">(</phrase>
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ channel is of type bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ sets the lower bound of the bounded-channel
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Postconditions:</term>
+ <listitem>
+ <para>
+ <code><phrase role="keyword">this</phrase><phrase role="special">-&gt;</phrase><phrase
+ role="identifier">lower_bound</phrase><phrase role="special">()</phrase>
+ <phrase role="special">==</phrase> <phrase role="identifier">lwm</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Notes:</term>
+ <listitem>
+ <para>
+ can only be used if a bounded-channel is used
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__submit__phrase__phrase_role__special_____phrase___phrase_role__identifier__act__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__act__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__submit__phrase__phrase_role__special_____phrase___phrase_role__identifier__act__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__act__phrase__phrase_role__special_____phrase___code_">Member
+ function <code><phrase role="identifier">submit</phrase><phrase role="special">(</phrase>
         <phrase role="identifier">Act</phrase> <phrase role="keyword">const</phrase><phrase
         role="special">&amp;</phrase> <phrase role="identifier">act</phrase><phrase
- role="special">)</phrase></code></link></title>
+ role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">submit</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">t</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- has_attribute&lt; pool &gt;::value == false &amp;&amp; ! closed()
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- submits an task to the pool and returns an associated handle
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task_rejected</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.static_pool.submit_attr">
- <title><link linkend="boost_task.reference.static_pool.submit_attr"> Member
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ has_attribute&lt; pool &gt;::value == false &amp;&amp; ! closed()
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ submits an task to the pool and returns an associated handle
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task_rejected</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__submit__phrase__phrase_role__special_____phrase___phrase_role__identifier__act__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__act__phrase__phrase_role__special_____phrase___phrase_role__identifier__attr__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__attr__phrase__phrase_role__special_____phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__submit__phrase__phrase_role__special_____phrase___phrase_role__identifier__act__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__act__phrase__phrase_role__special_____phrase___phrase_role__identifier__attr__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__attr__phrase__phrase_role__special_____phrase___code_">Member
         function <code><phrase role="identifier">submit</phrase><phrase role="special">(</phrase>
         <phrase role="identifier">Act</phrase> <phrase role="keyword">const</phrase><phrase
         role="special">&amp;</phrase> <phrase role="identifier">act</phrase><phrase
         role="special">,</phrase> <phrase role="identifier">Attr</phrase> <phrase
         role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase
- role="identifier">attr</phrase><phrase role="special">)</phrase></code></link></title>
-
+ role="identifier">attr</phrase><phrase role="special">)</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">R</phrase><phrase role="special">,</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Attr</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">handle</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">submit</phrase><phrase role="special">(</phrase> <phrase role="identifier">task</phrase><phrase role="special">&lt;</phrase> <phrase role="identifier">R</phrase> <phrase role="special">&gt;</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">t</phrase><phrase role="special">,</phrase> <phrase role="identifier">Attr</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">attr</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- has_attribute&lt; pool &gt;::value == true &amp;&amp; ! closed()
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- submits an task to the pool and returns an associated handle - task
- is scheduled by the attribute
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task_rejected</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ has_attribute&lt; pool &gt;::value == true &amp;&amp; ! closed()
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ submits an task to the pool and returns an associated handle - task is
+ scheduled by the attribute
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task_rejected</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
- <section id="boost_task.reference.utility">
- <title><link linkend="boost_task.reference.utility"> Utilities</link></title>
- <section id="boost_task.reference.utility.reschedule_until">
- <title><link linkend="boost_task.reference.utility.reschedule_until"> Non-member
- function <code><phrase role="identifier">reschedule_until</phrase><phrase
- role="special">()</phrase></code></link></title>
- <para>
-
+ <section id="boost_task.reference.reschedule_until">
+ <title><link linkend="boost_task.reference.reschedule_until"> Non-member function
+ <code><phrase role="identifier">reschedule_until</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Pred</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="keyword">void</phrase> <phrase role="identifier">reschedule_until</phrase><phrase role="special">(</phrase> <phrase role="identifier">Pred</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;)</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- reschedules current task until passed callable predicate becomes ready
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.get_pool">
- <title><link linkend="boost_task.reference.utility.get_pool"> Non-member
- function <code><phrase role="identifier">get_pool</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ reschedules current task until passed callable predicate becomes ready
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.get_pool">
+ <title><link linkend="boost_task.reference.get_pool"> Non-member function
+ <code><phrase role="identifier">get_pool</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Pool</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="identifier">Pool</phrase> <phrase role="special">&amp;</phrase> <phrase role="identifier">get_pool</phrase><phrase role="special">()</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns reference to the thread-pool where the current worker thread
- is executed
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.runs_in_pool">
- <title><link linkend="boost_task.reference.utility.runs_in_pool"> Non-member
- function <code><phrase role="identifier">runs_in_pool</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns reference to the thread-pool where the current worker thread
+ is executed
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.runs_in_pool">
+ <title><link linkend="boost_task.reference.runs_in_pool"> Non-member function
+ <code><phrase role="identifier">runs_in_pool</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">bool</phrase> <phrase role="identifier">runs_in_pool</phrase><phrase role="special">()</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns true if the current task is executed in a thread-pool
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.worker_id">
- <title><link linkend="boost_task.reference.utility.worker_id"> Non-member
- function <code><phrase role="identifier">worker_id</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns true if the current task is executed in a thread-pool
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.worker_id">
+ <title><link linkend="boost_task.reference.worker_id"> Non-member function
+ <code><phrase role="identifier">worker_id</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="identifier">id</phrase> <phrase role="identifier">worker_id</phrase><phrase role="special">()</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns returns the thread-id of the worker-thread
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.delay">
- <title><link linkend="boost_task.reference.utility.delay"> Non-member function
- <code><phrase role="identifier">delay</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns returns the thread-id of the worker-thread
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.delay">
+ <title><link linkend="boost_task.reference.delay"> Non-member function <code><phrase
+ role="identifier">delay</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">delay</phrase><phrase role="special">(</phrase> <phrase role="identifier">system_time</phrase> <phrase role="identifier">abs_time</phrase><phrase role="special">)</phrase>
@@ -3479,110 +3931,109 @@
 <phrase role="keyword">template</phrase><phrase role="special">&lt;</phrase> <phrase role="keyword">typename</phrase> <phrase role="identifier">Duration</phrase> <phrase role="special">&gt;</phrase>
 <phrase role="keyword">void</phrase> <phrase role="identifier">delay</phrase><phrase role="special">(</phrase> <phrase role="identifier">Duration</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">rel_time</phrase><phrase role="special">)</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- delays the execution of the current task so that the worker-thread
- can process another task in the meantime
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.yield">
- <title><link linkend="boost_task.reference.utility.yield"> Non-member function
- <code><phrase role="identifier">yield</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ delays the execution of the current task so that the worker-thread can
+ process another task in the meantime
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.yield">
+ <title><link linkend="boost_task.reference.yield"> Non-member function <code><phrase
+ role="identifier">yield</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">yield</phrase><phrase role="special">()</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- yields the current task so that the worker-threadcan process another
- task in the meantime
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.utility.interrupt">
- <title><link linkend="boost_task.reference.utility.interrupt"> Non-member
- function <code><phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase></code></link></title>
- <para>
-
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ yields the current task so that the worker-threadcan process another
+ task in the meantime
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+ <section id="boost_task.reference.interrupt">
+ <title><link linkend="boost_task.reference.interrupt"> Non-member function
+ <code><phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase></code></link></title>
+ <para>
+
 <programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">task</phrase><phrase role="special">/</phrase><phrase role="identifier">utility</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
 
 <phrase role="keyword">void</phrase> <phrase role="identifier">interrupt</phrase><phrase role="special">()</phrase>
 </programlisting>
- </para>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- task can request interruption for itself
- </para>
- </listitem>
- <listitem>
- <para>
- [Throws:
- </para>
- </listitem>
- <listitem>
- <para>
- Nothing.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Note:</term>
- <listitem>
- <para>
- This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ </para>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ task can request interruption for itself
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ [Throws:
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Nothing.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Note:</term>
+ <listitem>
+ <para>
+ This function resides in namespace <code><phrase role="identifier">boost</phrase><phrase
+ role="special">::</phrase><phrase role="identifier">this_task</phrase></code>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.has_attribute">
       <title><link linkend="boost_task.reference.has_attribute"> Meta function <code><phrase
@@ -3631,30 +4082,30 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.invalid_poolsize.constructor">
- <title><link linkend="boost_task.reference.invalid_poolsize.constructor">
- Constructor</link></title>
+ <anchor id="boost_task.reference.invalid_poolsize.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.invalid_poolsize.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">invalid_poolsize</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">msg</phrase><phrase role="special">);</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- Constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_poolsize</phrase></code>
- instance.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ Constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_poolsize</phrase></code> instance.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.invalid_scanns">
       <title><link linkend="boost_task.reference.invalid_scanns"> Class <code><phrase
@@ -3670,30 +4121,29 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.invalid_scanns.constructor">
- <title><link linkend="boost_task.reference.invalid_scanns.constructor"> Constructor</link></title>
-
+ <para>
+ heading Constructor]
+ </para>
+
 <programlisting><phrase role="identifier">invalid_scanns</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">msg</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- Constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_scanns</phrase></code>
- instance.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ Constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_scanns</phrase></code> instance.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.invalid_timeduration">
       <title><link linkend="boost_task.reference.invalid_timeduration"> Class <code><phrase
@@ -3709,30 +4159,30 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.invalid_timeduration.constructor">
- <title><link linkend="boost_task.reference.invalid_timeduration.constructor">
- Constructor</link></title>
+ <anchor id="boost_task.reference.invalid_timeduration.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.invalid_timeduration.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">invalid_timeduration</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">msg</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- Constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_timeduration</phrase></code>
- instance.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ Constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_timeduration</phrase></code> instance.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.invalid_watermark">
       <title><link linkend="boost_task.reference.invalid_watermark"> Class <code><phrase
@@ -3748,30 +4198,30 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.invalid_watermark.constructor">
- <title><link linkend="boost_task.reference.invalid_watermark.constructor">
- Constructor</link></title>
+ <anchor id="boost_task.reference.invalid_watermark.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.invalid_watermark.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">invalid_watermark</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">msg</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- Constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">invalid_watermark</phrase></code>
- instance.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ Constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code> instance.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.task_rejected">
       <title><link linkend="boost_task.reference.task_rejected"> Class <code><phrase
@@ -3787,30 +4237,30 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.task_rejected.constructor">
- <title><link linkend="boost_task.reference.task_rejected.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.task_rejected.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.task_rejected.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="identifier">task_rejected</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="keyword">const</phrase><phrase role="special">&amp;</phrase> <phrase role="identifier">msg</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- Constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task_rejected</phrase></code>
- instance.
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ Constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task_rejected</phrase></code> instance.
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.poolsize">
       <title><link linkend="boost_task.reference.poolsize"> Class <code><phrase role="identifier">poolsize</phrase></code></link></title>
@@ -3827,67 +4277,69 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.poolsize.constructor">
- <title><link linkend="boost_task.reference.poolsize.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.poolsize.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.poolsize.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">poolsize</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- value &gt; 0
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">poolsize</phrase></code>
- instance
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Postconditions:</term>
- <listitem>
- <para>
- operator std::size_t () &gt; 0
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_poolsize</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.poolsize.operator">
- <title><link linkend="boost_task.reference.poolsize.operator"> Member function
- <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ value &gt; 0
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">poolsize</phrase></code> instance
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Postconditions:</term>
+ <listitem>
+ <para>
+ operator std::size_t () &gt; 0
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_poolsize</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.poolsize.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.poolsize.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
         role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase
- role="special">()</phrase></code></link></title>
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns the value
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns the value
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.high_watermark">
       <title><link linkend="boost_task.reference.high_watermark"> Class <code><phrase
@@ -3905,55 +4357,57 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.high_watermark.constructor">
- <title><link linkend="boost_task.reference.high_watermark.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.high_watermark.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.high_watermark.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">high_watermark</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">tp</phrase><phrase
- role="special">::</phrase><phrase role="identifier">high_watermark</phrase></code>
- instance
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.high_watermark.operator">
- <title><link linkend="boost_task.reference.high_watermark.operator"> Member
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">tp</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">high_watermark</phrase></code> instance
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.high_watermark.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.high_watermark.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_">Member
         function <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
         role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase
- role="special">()</phrase></code></link></title>
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns high watermark
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns high watermark
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.low_watermark">
       <title><link linkend="boost_task.reference.low_watermark"> Class <code><phrase
@@ -3971,55 +4425,57 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.low_watermark.constructor">
- <title><link linkend="boost_task.reference.low_watermark.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.low_watermark.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.low_watermark.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">low_watermark</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">low_watermark</phrase></code>
- instance
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_watermark</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.low_watermark.operator">
- <title><link linkend="boost_task.reference.low_watermark.operator"> Member
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">low_watermark</phrase></code> instance
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_watermark</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.low_watermark.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.low_watermark.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_">Member
         function <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
         role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase
- role="special">()</phrase></code></link></title>
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns low watermark
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns low watermark
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
     <section id="boost_task.reference.scanns">
       <title><link linkend="boost_task.reference.scanns"> Class <code><phrase role="identifier">scanns</phrase></code></link></title>
@@ -4036,67 +4492,69 @@
 <phrase role="special">};</phrase>
 </programlisting>
       </para>
- <section id="boost_task.reference.scanns.constructor">
- <title><link linkend="boost_task.reference.scanns.constructor"> Constructor</link></title>
-
+ <anchor id="boost_task.reference.scanns.constructor"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.scanns.constructor">Constructor</link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">explicit</phrase> <phrase role="identifier">scanns</phrase><phrase role="special">(</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="identifier">value</phrase><phrase role="special">)</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Preconditions:</term>
- <listitem>
- <para>
- value &gt; 0
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- constructs a <code><phrase role="identifier">boost</phrase><phrase
- role="special">::</phrase><phrase role="identifier">task</phrase><phrase
- role="special">::</phrase><phrase role="identifier">scanns</phrase></code>
- instance
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Postconditions:</term>
- <listitem>
- <para>
- operator std::size_t () &gt; 0
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
- role="identifier">task</phrase><phrase role="special">::</phrase><phrase
- role="identifier">invalid_poolsize</phrase></code>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
- <section id="boost_task.reference.scanns.operator">
- <title><link linkend="boost_task.reference.scanns.operator"> Member function
- <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
+ <variablelist>
+ <title></title> <varlistentry><term>Preconditions:</term>
+ <listitem>
+ <para>
+ value &gt; 0
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ constructs a <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">scanns</phrase></code> instance
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Postconditions:</term>
+ <listitem>
+ <para>
+ operator std::size_t () &gt; 0
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">task</phrase><phrase role="special">::</phrase><phrase
+ role="identifier">invalid_poolsize</phrase></code>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="boost_task.reference.scanns.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_"/>
+ <bridgehead renderas="sect4">
+ <link linkend="boost_task.reference.scanns.member_function__code__phrase_role__keyword__operator__phrase___phrase_role__identifier__std__phrase__phrase_role__special______phrase__phrase_role__identifier__size_t__phrase__phrase_role__special______phrase___code_">Member
+ function <code><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase
         role="special">::</phrase><phrase role="identifier">size_t</phrase><phrase
- role="special">()</phrase></code></link></title>
+ role="special">()</phrase></code></link>
+ </bridgehead>
+
 <programlisting><phrase role="keyword">operator</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">size_t</phrase> <phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
 </programlisting>
- <variablelist>
- <title></title> <varlistentry><term>Effects:</term>
- <listitem>
- <para>
- returns the value
- </para>
- </listitem>
- </varlistentry> <varlistentry><term>Throws:</term>
- <listitem>
- <para>
- Nothing
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title></title> <varlistentry><term>Effects:</term>
+ <listitem>
+ <para>
+ returns the value
+ </para>
+ </listitem>
+ </varlistentry> <varlistentry><term>Throws:</term>
+ <listitem>
+ <para>
+ Nothing
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
     </section>
   </section>
   <section id="boost_task.appendices">
@@ -4177,7 +4635,7 @@
       </bridgehead>
       <itemizedlist>
         <listitem>
- <emphasis>asynchronous-executors</emphasis> related to a <emphasis>thread-pool</emphasis>
+ <emphasis>execution-policies</emphasis> related to a <emphasis>thread-pool</emphasis>
           (like <code><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase
           role="identifier">task</phrase><phrase role="special">::</phrase><phrase
           role="identifier">default_pool</phrase></code>) could support explicit
@@ -4217,8 +4675,9 @@
       <title><link linkend="boost_task.appendices.acknowledgements"> Appendix B:
       Acknowledgments</link></title>
       <para>
- I'd like to thank Vicente J. Botet Escriba for his comments on the implementation
- and Anthony Williams and Braddock Gaskill for their future libraries.
+ I'd like to thank Vicente J. Botet Escriba for his contributions (default_pool,
+ reschedule_until, sleep, yield) and Anthony Williams and Braddock Gaskill
+ for their future libraries.
       </para>
     </section>
   </section>

Modified: sandbox/task/libs/task/doc/default_pool.qbk
==============================================================================
--- sandbox/task/libs/task/doc/default_pool.qbk (original)
+++ sandbox/task/libs/task/doc/default_pool.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -34,13 +34,13 @@
 
                 boost::task::handle< long > h1(
                         boost::task::async(
- boost::task::default_pool(), // asynchronous executor == default-pool
- boost::task::make_task( fibonacci_fn, 10) ) );
+ boost::task::make_task( fibonacci_fn, 10),
+ boost::task::default_pool() ) ); // execution-policy == default-pool
 
                 boost::task::handle< long > h2(
                         boost::task::async(
- boost::task::default_pool(), // asynchronous executor == default-pool
- boost::task::make_task( fibonacci_fn, 5) ) );
+ boost::task::make_task( fibonacci_fn, 5),
+ boost::task::default_pool() ) ); // execution-policy == default-pool
 
                 std::cout << "fibonacci(10) == " << h1.get() << "\n";
                 std::cout << "fibonacci(5) == " << h2.get() << std::endl;

Added: sandbox/task/libs/task/doc/execution_policy.qbk
==============================================================================
--- (empty file)
+++ sandbox/task/libs/task/doc/execution_policy.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -0,0 +1,22 @@
+[/
+ Copyright Oliver Kowalke 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
+]
+
+
+[section:execution_policy Execution policy]
+
+In contrast to synchronous methods asynchronous methods do not block the program flow when a time consuming operation is executed.
+The application continues executing the current context and when the result of the asynchronous method is required the __act__ can be used.
+
+A __ep__ describes how a __task__ gets asynchronously executed and provides a link_handle(__act__) to manage the __task__.
+
+[include own_thread.qbk]
+[include new_thread.qbk]
+[include pool.qbk]
+[include as_sub_task.qbk]
+
+
+[endsect]

Modified: sandbox/task/libs/task/doc/fork_join.qbk
==============================================================================
--- sandbox/task/libs/task/doc/fork_join.qbk (original)
+++ sandbox/task/libs/task/doc/fork_join.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -28,18 +28,20 @@
                 {
                         // fork a sub-task calculating fibonacci(n-1)
                         h1 = boost::task::async(
- boost::task::as_sub_task(),
                                 boost::task::make_task(
                                         parallel_fib,
                                         n - 1,
- cutof) );
+ cutof),
+ boost::task::as_sub_task() );
+
                         // fork a sub-task calculating fibonacci(n-2)
                         h2 = boost::task::async(
- boost::task::as_sub_task(),
                                 boost::task::make_task(
                                         parallel_fib,
                                         n - 2,
- cutof) );
+ cutof),
+ boost::task::as_sub_task() );
+
                         // join the results of both sub-tasks
                         // if one of the both sub-tasks is not ready
                         // the worker-thread does not block, it executes other
@@ -50,13 +52,13 @@
 
         void main()
         {
- boost::task::handle< long > h( // handle for fibonacci calculation
+ boost::task::handle< long > h( // handle for fibonacci calculation
                         boost::task::async(
- boost::task::default_pool(), // access the default thread-pool
- boost::task::make_task( // calculate fibonacci number 10
- parallel_fib, // for numbers < 5 do inline recursive calculation
+ boost::task::make_task( // calculate fibonacci number 10
+ parallel_fib, // for numbers < 5 do inline recursive calculation
                                         10,
- 5) ) );
+ 5),
+ boost::task::default_pool() ) ); // access the default thread-pool
                 std::cout << h.get() << std::endl;
         }
 ``

Modified: sandbox/task/libs/task/doc/handle.qbk
==============================================================================
--- sandbox/task/libs/task/doc/handle.qbk (original)
+++ sandbox/task/libs/task/doc/handle.qbk 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -12,14 +12,14 @@
 the task and state necessary to process the result of the operation [footnote see [@http://www.cs.wustl.edu/~schmidt/PDF/ACT.pdf
 'Asynchronous Completion Token'], Douglas Schmidt].
 
-__handle__ represents an __act__. It will be returned by __fn_async__ and is associated with the submitted __task__.
+__handle__ represents an __act__. It will be returned by [link_async __fn_async__] and is associated with the submitted __task__.
 
 
 [heading Asynchronous completion token interface]
 
-__handle__ implements an interface in order to check the state of computation and result transfer
+__handle__ implements an interface in order to check the state of computation and to transfer the result.
 
-* __fn_get_id__: return id of the associated task-id
+* __fn_get_id__: return id of the associated __task_id__
 
 * __fn_is_ready__: test if result is set
 
@@ -27,7 +27,7 @@
 
 * __fn_has_exception__: test if exception-result is set
 
-* __fn_get__: return value-result
+* __fn_get__: return value-result or throw the exception-result
 
 * __fn_wait__: wait until result is set
 
@@ -38,23 +38,15 @@
 ``
         long fibonacci( long n)
         {
- boost::this_thread::interruption_point(); // interruption point
-
                 if ( n == 0) return 0;
                 if ( n == 1) return 1;
                 long k1( 1), k2( 0);
                 for ( int i( 2); i <= n; ++i)
                 {
- if ( boost::this_thread::interruption_requested() ) // check if interruption was requested
- return;
-
                         long tmp( k1);
                         k1 = k1 + k2;
                         k2 = tmp;
                 }
-
- boost::this_thread::interruption_point(); // interruption point
-
                 return k1;
         }
 
@@ -62,10 +54,10 @@
         {
                 boost::task::handle< long > h(
                         boost::task::async(
- boost::task::new_thread(),
                                 boost::task::make_task(
                                         fibonacci,
- 10) ) );
+ 10),
+ boost::task::new_thread() ) );
                 std::cout << "id == " << h.get_id() << "\n";
                 std::cout << "is ready == " << std::boolalpha << h.is_ready() << "\n";
                 h.wait();
@@ -75,15 +67,20 @@
         }
 ``
 
+
 [heading Task interruption]
 
+Each invokation of __fn_async__ returns an __handle__ which allows to control the associated __task__ (passed to __fn_async__). This includes
+the ability to interrupt an __task__ if it is cooperative. Cooperative means that the __task__ contains __interruption_points__ or checks for
+interruption requests [footnote see [@http://www.ddj.com/architect/207100682 'Interrupt Politely'], Herb Sutter].
+
 * __fn_interrupt__: interrupt __task__ and return immediately
 
 * __fn_interrupt_and_wait__: interrupt and wait until __task__ was removed from __worker_thread__
 
 * __fn_interrupt_and_wait_for__: interrupt and wait until __task__ was removed from __worker_thread__ or time duration has elapsed
 
-* __fn_interrupt_and_wait_until__: interrupt and wait until __task__ was removed from __worker_thread__ or time point has elapsed
+* __fn_interrupt_and_wait_until__: interrupt and wait until __task__ was removed from __worker_thread__ or time point has reached
 
 * __fn_interruption_requested__: return bool if interruption was requested
 
@@ -91,7 +88,7 @@
         long cooperative( long n)
         {
                 boost::this_thread::interruption_point(); // interruption point
-
+
                 if ( n == 0) return 0;
                 if ( n == 1) return 1;
                 long k1( 1), k2( 0);
@@ -99,25 +96,25 @@
                 {
                         if ( boost::this_thread::interruption_requested() ) // check if interruption was requested
                                 return;
-
+
                         long tmp( k1);
                         k1 = k1 + k2;
                         k2 = tmp;
                 }
-
+
                 boost::this_thread::interruption_point(); // interruption point
-
+
                 return k1;
         }
 
         void main()
         {
                 boost::task::handle< long > h( // get handle associated with the task
- boost::task::async(
- boost::task::new_thread(), // asynchronous executor
+ boost::task::async(
                                 boost::task::make_task( // task, to be executed asynchronously
                                         cooperative,
- 10) ) );
+ 10),
+ boost::task::new_thread() ) ); // asynchronous executor
                 h.interrupt_and_wait();
                 std::cout << "id == " << h.get_id() << "\n";
                 std::cout << "is ready == " << std::boolalpha << h.is_ready() << "\n";
@@ -127,4 +124,76 @@
         }
 ``
 
+[note If the task is still pending when an interruption is requested - the task is not removed from the queue, it is marked to be interrupted instead.]
+
+
+[heading Waiting for handles]
+
+__boost_task__ provides function __waitfor_all__ waits for all handles passed to this function to become ready
+
+
+``
+ void main()
+ {
+ std::vector handles< boost::task::handle< long > > results;
+ results.reserve( 10);
+
+ for ( int i = 0; i < 10; ++i)
+ results.push_back(
+ boost::task::async(
+ boost::task::make_task(
+ fibonacci,
+ 10) ) ) );
+
+ // wait until all tasks are ready
+ boost::task::waitfor_all( results.begin(), results.end() );
+
+ int k = 0;
+ std::vector< boost::task::handle< long > >::iterator e( results.end() );
+ for (
+ std::vector< boost::task::handle< long > >::iterator i( results.begin() );
+ i != e;
+ ++i)
+ std::cout << "fibonacci(" << k++ << ") == " << i->get() << std::endl;
+ }
+``
+
+
+and __waitfor_any__ which returns if at least one of the passed handles becomes ready.
+
+
+``
+ void main()
+ {
+ boost::task::handle< long > h1(
+ boost::task::async(
+ boost::task::make_task(
+ cooperative,
+ 10) ) );
+
+ boost::task::handle< long > h2(
+ boost::task::async(
+ boost::task::make_task(
+ cooperative,
+ 7) ) );
+
+ boost::task::handle< long > h3(
+ boost::task::async(
+ boost::task::make_task(
+ cooperative,
+ 5) ) );
+
+ // wait for any task becomes ready
+ boost::task::waitfor_any( h1, h2, h3);
+
+ if ( h1.is_ready() )
+ std::cout << "fibonacci(10) == " << h1.get() << std::endl;
+ if ( h2.is_ready() )
+ std::cout << "fibonacci(7) == " << h2.get() << std::endl;
+ if ( h3.is_ready() )
+ std::cout << "fibonacci(5) == " << h3.get() << std::endl;
+ }
+``
+
+
 [endsect]

Modified: sandbox/task/libs/task/doc/html/boost_task/appendices.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/appendices.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/appendices.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -35,7 +35,7 @@
 <a name="boost_task.appendices.todo"></a><a class="link" href="appendices.html#boost_task.appendices.todo" title="Appendix A: Future development"> Appendix A: Future development</a>
 </h3></div></div></div>
 <a name="boost_task.appendices.todo.dynamic_thread_pool"></a><h5>
-<a name="id598832"></a>
+<a name="id627171"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.dynamic_thread_pool">Dynamic thread-pool</a>
       </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
@@ -44,7 +44,7 @@
           oversubscription).
         </li></ul></div>
 <a name="boost_task.appendices.todo.communication_and_synchronisation_abstractions"></a><h5>
-<a name="id598896"></a>
+<a name="id627235"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.communication_and_synchronisation_abstractions">Communication
         and synchronisation abstractions</a>
       </h5>
@@ -87,7 +87,7 @@
         </li>
 </ul></div>
 <a name="boost_task.appendices.todo.interdepended_task"></a><h5>
-<a name="id598986"></a>
+<a name="id627326"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.interdepended_task">Interdepended
         task</a>
       </h5>
@@ -96,17 +96,17 @@
           tasks work in <span class="emphasis"><em>thread-pools</em></span> (using context switching/fibers).
         </li></ul></div>
 <a name="boost_task.appendices.todo.support_of_explicit_processor_bindig"></a><h5>
-<a name="id599017"></a>
+<a name="id627357"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.support_of_explicit_processor_bindig">Support
         of explicit processor bindig</a>
       </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<span class="emphasis"><em>asynchronous-executors</em></span> related to a <span class="emphasis"><em>thread-pool</em></span>
+<span class="emphasis"><em>execution-policies</em></span> related to a <span class="emphasis"><em>thread-pool</em></span>
           (like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span></code>) could support explicit
           processor binding.
         </li></ul></div>
 <a name="boost_task.appendices.todo.optimizations"></a><h5>
-<a name="id599080"></a>
+<a name="id627420"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.optimizations">Optimizations</a>
       </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
@@ -119,7 +119,7 @@
         </li>
 </ul></div>
 <a name="boost_task.appendices.todo.actor_framework"></a><h5>
-<a name="id599114"></a>
+<a name="id627454"></a>
         <a class="link" href="appendices.html#boost_task.appendices.todo.actor_framework">Actor framework</a>
       </h5>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
@@ -140,8 +140,9 @@
       Acknowledgments</a>
 </h3></div></div></div>
 <p>
- I'd like to thank Vicente J. Botet Escriba for his comments on the implementation
- and Anthony Williams and Braddock Gaskill for their future libraries.
+ I'd like to thank Vicente J. Botet Escriba for his contributions (default_pool,
+ reschedule_until, sleep, yield) and Anthony Williams and Braddock Gaskill
+ for their future libraries.
       </p>
 </div>
 </div>

Modified: sandbox/task/libs/task/doc/html/boost_task/as_sub_task.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/as_sub_task.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/as_sub_task.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -32,35 +32,18 @@
       task is executed inside a <span class="emphasis"><em>thread-pool</em></span> the <span class="emphasis"><em>sub-task</em></span>
       is put into the local-queue of the <span class="emphasis"><em>worker-thread</em></span> in the
       other case the <span class="emphasis"><em>sub-task</em></span> will be executed in a new thread.
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span></code>
+ is used as default <span class="emphasis"><em>execution-policy</em></span> for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code>,
     </p>
 <p>
       
 </p>
 <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">(),</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                         <span class="identifier">fibonacci</span><span class="special">,</span>
- <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-</pre>
-<p>
- </p>
-<p>
- is equivalent to:
- </p>
-<p>
-
-</p>
-<pre class="programlisting"><span class="keyword">if</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_task</span><span class="special">::</span><span class="identifier">runs_in_pool</span><span class="special">()</span> <span class="special">)</span>
-<span class="special">{</span>
- <span class="comment">// put the sub-task into worker-threads local-queue
-</span><span class="special">}</span>
-<span class="keyword">else</span>
-<span class="special">{</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(...)</span> <span class="special">);</span>
-<span class="special">}</span>
+ <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
 </pre>
 <p>
     </p>

Added: sandbox/task/libs/task/doc/html/boost_task/async.html
==============================================================================
--- (empty file)
+++ sandbox/task/libs/task/doc/html/boost_task/async.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -0,0 +1,89 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Asynchronous execution</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Task">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Task">
+<link rel="prev" href="handle.html" title="Handle">
+<link rel="next" href="own_thread.html" title="Execute in own thread">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="handle.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="own_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Asynchronous execution">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_task.async"></a><a class="link" href="async.html" title="Asynchronous execution"> Asynchronous execution</a>
+</h2></div></div></div>
+<p>
+ The function <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code> passes the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code> to the <span class="emphasis"><em>execution-policy</em></span>
+ which executes the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>
+ (for this purpose <span class="emphasis"><em>execution-policy</em></span> is required to provide
+ <code class="computeroutput"><span class="identifier">handle</span><span class="special">&lt;</span>
+ <span class="identifier">R</span> <span class="special">&gt;</span>
+ <span class="keyword">operator</span><span class="special">()(</span>
+ <span class="identifier">task</span><span class="special">&lt;</span>
+ <span class="identifier">R</span> <span class="special">&gt;</span>
+ <span class="identifier">tsk</span><span class="special">)</span></code>).
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code> accepts two arguments - the first is an
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>
+ object and the second an <span class="emphasis"><em>execution-policy</em></span>. For the second
+ argument <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span></code>
+ is used per default. The function returns a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code> which controls the submitted <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">long</span> <span class="identifier">fibonacci</span><span class="special">(</span> <span class="keyword">long</span> <span class="identifier">n</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="keyword">long</span> <span class="identifier">k1</span><span class="special">(</span> <span class="number">1</span><span class="special">),</span> <span class="identifier">k2</span><span class="special">(</span> <span class="number">0</span><span class="special">);</span>
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">(</span> <span class="number">2</span><span class="special">);</span> <span class="identifier">i</span> <span class="special">&lt;=</span> <span class="identifier">n</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">long</span> <span class="identifier">tmp</span><span class="special">(</span> <span class="identifier">k1</span><span class="special">);</span>
+ <span class="identifier">k1</span> <span class="special">=</span> <span class="identifier">k1</span> <span class="special">+</span> <span class="identifier">k2</span><span class="special">;</span>
+ <span class="identifier">k2</span> <span class="special">=</span> <span class="identifier">tmp</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">return</span> <span class="identifier">k1</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// get handle associated with the task
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// compute fibonacci(10) asynchron
+</span> <span class="identifier">fibonacci</span><span class="special">,</span>
+ <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"id == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get_id</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// throws boost::task::task_interrupted
+</span><span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Oliver Kowalke<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="handle.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="own_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Modified: sandbox/task/libs/task/doc/html/boost_task/handle.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/handle.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/handle.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -7,7 +7,7 @@
 <link rel="home" href="../index.html" title="Chapter 1. Boost.Task">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Task">
 <link rel="prev" href="task.html" title="Task">
-<link rel="next" href="own_thread.html" title="Execute in own thread">
+<link rel="next" href="async.html" title="Asynchronous execution">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="task.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="own_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="task.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="async.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" title="Handle">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -31,29 +31,30 @@
       response to the completion of asynchronous operations. <span class="emphasis"><em>asynchronous-completion-token</em></span>
       uniquely identifies the task and state necessary to process the result of the
       operation
- <sup>[<a name="id569908" href="#ftn.id569908" class="footnote">3</a>]</sup>
+ <sup>[<a name="id590338" href="#ftn.id590338" class="footnote">3</a>]</sup>
       .
     </p>
 <p>
       <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code>
       represents an <span class="emphasis"><em>asynchronous-completion-token</em></span>. It will be
- returned by <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code> and is associated with the submitted <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>.
+ returned by <a class="link" href="async.html" title="Asynchronous execution"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code></a>
+ and is associated with the submitted <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>.
     </p>
 <a name="boost_task.handle.asynchronous_completion_token_interface"></a><h4>
-<a name="id570012"></a>
+<a name="id590444"></a>
       <a class="link" href="handle.html#boost_task.handle.asynchronous_completion_token_interface">Asynchronous
       completion token interface</a>
     </h4>
 <p>
       <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code>
- implements an interface in order to check the state of computation and result
- transfer
+ implements an interface in order to check the state of computation and to transfer
+ the result.
     </p>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code>:
- return id of the associated task-id
- </li>
+ return id of the associated <span class="emphasis"><em>task-id</em></span>
+</li>
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">is_ready</span><span class="special">()</span></code>:
         test if result is set
@@ -68,7 +69,7 @@
       </li>
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">get</span><span class="special">()</span></code>:
- return value-result
+ return value-result or throw the exception-result
       </li>
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">wait</span><span class="special">()</span></code>:
@@ -88,23 +89,15 @@
 </p>
 <pre class="programlisting"><span class="keyword">long</span> <span class="identifier">fibonacci</span><span class="special">(</span> <span class="keyword">long</span> <span class="identifier">n</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_point</span><span class="special">();</span> <span class="comment">// interruption point
-</span>
         <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
         <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
         <span class="keyword">long</span> <span class="identifier">k1</span><span class="special">(</span> <span class="number">1</span><span class="special">),</span> <span class="identifier">k2</span><span class="special">(</span> <span class="number">0</span><span class="special">);</span>
         <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">(</span> <span class="number">2</span><span class="special">);</span> <span class="identifier">i</span> <span class="special">&lt;=</span> <span class="identifier">n</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
         <span class="special">{</span>
- <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_requested</span><span class="special">()</span> <span class="special">)</span> <span class="comment">// check if interruption was requested
-</span> <span class="keyword">return</span><span class="special">;</span>
-
                 <span class="keyword">long</span> <span class="identifier">tmp</span><span class="special">(</span> <span class="identifier">k1</span><span class="special">);</span>
                 <span class="identifier">k1</span> <span class="special">=</span> <span class="identifier">k1</span> <span class="special">+</span> <span class="identifier">k2</span><span class="special">;</span>
                 <span class="identifier">k2</span> <span class="special">=</span> <span class="identifier">tmp</span><span class="special">;</span>
         <span class="special">}</span>
-
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_point</span><span class="special">();</span> <span class="comment">// interruption point
-</span>
         <span class="keyword">return</span> <span class="identifier">k1</span><span class="special">;</span>
 <span class="special">}</span>
 
@@ -112,10 +105,10 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">fibonacci</span><span class="special">,</span>
- <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"id == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get_id</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"is ready == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">boolalpha</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">is_ready</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
         <span class="identifier">h</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
@@ -127,9 +120,19 @@
 <p>
     </p>
 <a name="boost_task.handle.task_interruption"></a><h4>
-<a name="id571214"></a>
+<a name="id591532"></a>
       <a class="link" href="handle.html#boost_task.handle.task_interruption">Task interruption</a>
     </h4>
+<p>
+ Each invokation of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code> returns an <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code> which allows to control the associated
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>
+ (passed to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">()</span></code>). This includes the ability to interrupt
+ an <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code>
+ if it is cooperative. Cooperative means that the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code> contains <span class="emphasis"><em>interruption-points</em></span>
+ or checks for interruption requests
+ <sup>[<a name="id591705" href="#ftn.id591705" class="footnote">4</a>]</sup>
+ .
+ </p>
 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">interrupt</span><span class="special">()</span></code>:
@@ -148,7 +151,7 @@
       </li>
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">interrupt_and_wait_until</span><span class="special">()</span></code>: interrupt and wait until <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">task</span></code> was removed from <span class="emphasis"><em>worker-thread</em></span>
- or time point has elapsed
+ or time point has reached
       </li>
 <li class="listitem">
 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_requested</span><span class="special">()</span></code>:
@@ -161,7 +164,7 @@
 <pre class="programlisting"><span class="keyword">long</span> <span class="identifier">cooperative</span><span class="special">(</span> <span class="keyword">long</span> <span class="identifier">n</span><span class="special">)</span>
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_point</span><span class="special">();</span> <span class="comment">// interruption point
-</span>
+</span>
         <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
         <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
         <span class="keyword">long</span> <span class="identifier">k1</span><span class="special">(</span> <span class="number">1</span><span class="special">),</span> <span class="identifier">k2</span><span class="special">(</span> <span class="number">0</span><span class="special">);</span>
@@ -169,26 +172,26 @@
         <span class="special">{</span>
                 <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_requested</span><span class="special">()</span> <span class="special">)</span> <span class="comment">// check if interruption was requested
 </span> <span class="keyword">return</span><span class="special">;</span>
-
+
                 <span class="keyword">long</span> <span class="identifier">tmp</span><span class="special">(</span> <span class="identifier">k1</span><span class="special">);</span>
                 <span class="identifier">k1</span> <span class="special">=</span> <span class="identifier">k1</span> <span class="special">+</span> <span class="identifier">k2</span><span class="special">;</span>
                 <span class="identifier">k2</span> <span class="special">=</span> <span class="identifier">tmp</span><span class="special">;</span>
         <span class="special">}</span>
-
+
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">interruption_point</span><span class="special">();</span> <span class="comment">// interruption point
-</span>
+</span>
         <span class="keyword">return</span> <span class="identifier">k1</span><span class="special">;</span>
 <span class="special">}</span>
 
 <span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// get handle associated with the task
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// task, to be executed asynchronously
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// task, to be executed asynchronously
 </span> <span class="identifier">cooperative</span><span class="special">,</span>
- <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
- <span class="identifier">h</span><span class="special">.</span><span class="identifier">interrupt_and_wait</span><span class="special">();</span>
+ <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// asynchronous executor
+</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">interrupt_and_wait</span><span class="special">();</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"id == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get_id</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"is ready == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">boolalpha</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">is_ready</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"has value == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">boolalpha</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">has_value</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
@@ -198,12 +201,103 @@
 </pre>
 <p>
     </p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ If the task is still pending when an interruption is requested - the task
+ is not removed from the queue, it is marked to be interrupted instead.
+ </p></td></tr>
+</table></div>
+<a name="boost_task.handle.waiting_for_handles"></a><h4>
+<a name="id592975"></a>
+ <a class="link" href="handle.html#boost_task.handle.waiting_for_handles">Waiting for handles</a>
+ </h4>
+<p>
+ <span class="bold"><strong>Boost.Task</strong></span> provides function <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">waitfor_all</span><span class="special">()</span></code> waits for all handles passed to this function
+ to become ready
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span> <span class="identifier">handles</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">results</span><span class="special">;</span>
+ <span class="identifier">results</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span> <span class="number">10</span><span class="special">);</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">results</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
+ <span class="identifier">fibonacci</span><span class="special">,</span>
+ <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+
+ <span class="comment">// wait until all tasks are ready
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">results</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">results</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">int</span> <span class="identifier">k</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">e</span><span class="special">(</span> <span class="identifier">results</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">for</span> <span class="special">(</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">i</span><span class="special">(</span> <span class="identifier">results</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">e</span><span class="special">;</span>
+ <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci("</span> <span class="special">&lt;&lt;</span> <span class="identifier">k</span><span class="special">++</span> <span class="special">&lt;&lt;</span> <span class="string">") == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span><span class="special">-&gt;</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">waitfor_any</span><span class="special">()</span></code> which returns if at least one of the passed
+ handles becomes ready.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h1</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
+ <span class="identifier">cooperative</span><span class="special">,</span>
+ <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h2</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
+ <span class="identifier">cooperative</span><span class="special">,</span>
+ <span class="number">7</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h3</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
+ <span class="identifier">cooperative</span><span class="special">,</span>
+ <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+
+ <span class="comment">// wait for any task becomes ready
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">h1</span><span class="special">,</span> <span class="identifier">h2</span><span class="special">,</span> <span class="identifier">h3</span><span class="special">);</span>
+
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">is_ready</span><span class="special">()</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">h2</span><span class="special">.</span><span class="identifier">is_ready</span><span class="special">()</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(7) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h2</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">h3</span><span class="special">.</span><span class="identifier">is_ready</span><span class="special">()</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(5) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h3</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id569908" href="#id569908" class="para">3</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id590338" href="#id590338" class="para">3</a>] </sup>
           see <a href="http://www.cs.wustl.edu/~schmidt/PDF/ACT.pdf" target="_top">'Asynchronous
           Completion Token'</a>, Douglas Schmidt
         </p></div>
+<div class="footnote"><p><sup>[<a name="ftn.id591705" href="#id591705" class="para">4</a>] </sup>
+ see 'Interrupt Politely',
+ Herb Sutter
+ </p></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -216,7 +310,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="task.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="own_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="task.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="async.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/task/libs/task/doc/html/boost_task/motivation.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/motivation.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/motivation.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -30,7 +30,7 @@
       To speed-up computer-bound work and/or increase the computation-throughput
       is a common motivation for parallelizing a program. Especially for interactive
       applications that have to process user input while performing some background
- tasks responsivness iss very important. Parallelizing a program requires partitioning
+ tasks responsivness is very important. Parallelizing a program requires partitioning
       the program into smaller chunks that can run in parallel. The code can scale
       as the hardware gets better without changing the code.
     </p>
@@ -46,13 +46,13 @@
 <tr><td align="left" valign="top"><p>
         <span class="quote">&#8220;<span class="quote">You can have multithreading on a single core machine, but you can
         only have parallelism on a multi core machine ... .</span>&#8221;</span> -- Daniel Moth
- <sup>[<a name="id563974" href="#ftn.id563974" class="footnote">1</a>]</sup>
+ <sup>[<a name="id584468" href="#ftn.id584468" class="footnote">1</a>]</sup>
       </p></td></tr>
 </table></div>
 <p>
       <span class="bold"><strong>Boost.Task</strong></span> provides a framework to utilize
       the available hardware and provide a way for efficient asynchronous processing
- of time consuming operations. The framework provides some <span class="emphasis"><em>asynchronous-executors</em></span>,
+ of time consuming operations. The framework provides some <span class="emphasis"><em>execution-policies</em></span>,
       like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span></code>,
       in order to execute the task asynchronously in another execution context (<span class="bold"><strong>Boost.Task</strong></span> uses preemptible threads for this purpose).
     </p>
@@ -65,11 +65,11 @@
 <span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span> <span class="comment">// dispatchs task
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span> <span class="comment">// asynchronous executor
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// task, to be executed asynchronously
 </span> <span class="identifier">print</span><span class="special">,</span>
- <span class="string">"Hello World!"</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-<span class="special">}</span>
+ <span class="string">"Hello World!"</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span><span class="special">}</span>
 </pre>
 <p>
     </p>
@@ -89,11 +89,11 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// get handle associated with the task
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// task, to be executed asynchronously
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// task, to be executed asynchronously
 </span> <span class="identifier">echo</span><span class="special">,</span>
- <span class="string">"Hello World!"</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// wait until task is finished and return the result
+ <span class="string">"Hello World!"</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// wait until task is finished and return the result
 </span><span class="special">}</span>
 </pre>
 <p>
@@ -111,12 +111,12 @@
 <span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// get handle associated with the task
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// long runing task, to be executed asynchronously
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// long runing task, to be executed asynchronously
 </span> <span class="identifier">long_running</span><span class="special">,</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">millisec</span><span class="special">(</span> <span class="number">500</span><span class="special">)</span> <span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
- <span class="identifier">h</span><span class="special">.</span><span class="identifier">interrupt</span><span class="special">();</span> <span class="comment">// interrupt execution of task
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">millisec</span><span class="special">(</span> <span class="number">500</span><span class="special">)</span> <span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">interrupt</span><span class="special">();</span> <span class="comment">// interrupt execution of task
 </span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// wait until task is finished, will throw an exeception
 </span><span class="special">}</span>
 </pre>
@@ -148,18 +148,20 @@
         <span class="special">{</span>
                 <span class="comment">// fork a sub-task calculating fibonacci(n-1)
 </span> <span class="identifier">h1</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_task</span><span class="special">::</span><span class="identifier">get_pool</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">parallel_fib</span><span class="special">,</span>
                                 <span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">,</span>
- <span class="identifier">cutof</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">cutof</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_task</span><span class="special">::</span><span class="identifier">get_pool</span><span class="special">()</span> <span class="special">);</span>
+
                 <span class="comment">// fork a sub-task calculating fibonacci(n-2)
 </span> <span class="identifier">h2</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_task</span><span class="special">::</span><span class="identifier">get_pool</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">parallel_fib</span><span class="special">,</span>
                                 <span class="identifier">n</span> <span class="special">-</span> <span class="number">2</span><span class="special">,</span>
- <span class="identifier">cutof</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">cutof</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_task</span><span class="special">::</span><span class="identifier">get_pool</span><span class="special">()</span> <span class="special">);</span>
+
                 <span class="comment">// join the results of both sub-tasks
 </span> <span class="keyword">return</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">h2</span><span class="special">.</span><span class="identifier">get</span><span class="special">();</span>
         <span class="special">}</span>
@@ -167,14 +169,14 @@
 
 <span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// handle for fibonacci calculation
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// handle for fibonacci calculation
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">(),</span> <span class="comment">// access the default thread-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// calculate fibonacci number 10
-</span> <span class="identifier">parallel_fib</span><span class="special">,</span> <span class="comment">// for numbers &lt; 5 do inline recursive calculation
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// calculate fibonacci number 10
+</span> <span class="identifier">parallel_fib</span><span class="special">,</span> <span class="comment">// for numbers &lt; 5 do inline recursive calculation
 </span> <span class="number">10</span><span class="special">,</span>
- <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// access the default thread-pool
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -192,17 +194,17 @@
       
 </p>
 <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">(),</span> <span class="comment">// sub-task executed in a new thread or inside
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// the thread-pool depending upon the parent
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// the thread-pool depending upon the parent
 </span> <span class="identifier">parallel_fib</span><span class="special">,</span> <span class="comment">// task is executed inside a thread-pool or not
 </span> <span class="number">10</span><span class="special">,</span>
- <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-</pre>
+ <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// sub-task executed in a new thread or inside
+</span></pre>
 <p>
     </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id563974" href="#id563974" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id584468" href="#id584468" class="para">1</a>] </sup>
             more to read at Daniel's blog
           </p></div>
 </div>

Modified: sandbox/task/libs/task/doc/html/boost_task/new_thread.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/new_thread.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/new_thread.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -30,19 +30,10 @@
       <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span></code>
       creates a new <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">thread</span></code> and executes the task in this thread
       (asynchronous). The created thread gets joined by handle (so N2802
- should be addressed).
+ should be addressed). The returned <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code> joins the thread in its destructor
+ (if the last reference gets out of scope) and thus provides one possible solution
+ of N2880.
     </p>
-<div class="caution" title="Caution"><table border="0" summary="Caution">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../doc/html/images/caution.png"></td>
-<th align="left">Caution</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- Always store the returned <span class="emphasis"><em>asynchronous-completion-token</em></span>
- in a variable because <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code>
- joins the thread in its destructor (if the last reference gets out of scope).
- </p></td></tr>
-</table></div>
 <p>
       
 </p>
@@ -64,15 +55,26 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">fibonacci</span><span class="special">,</span>
- <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
     </p>
+<div class="caution" title="Caution"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../doc/html/images/caution.png"></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Always store the returned <span class="emphasis"><em>asynchronous-completion-token</em></span>
+ in a variable because <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span></code>
+ joins the thread in its destructor (if the last reference gets out of scope).
+ </p></td></tr>
+</table></div>
 <p>
       In the example below both <code class="computeroutput"><span class="identifier">a_function</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">another_function</span><span class="special">()</span></code> are executed synchron (see <a class="link" href="own_thread.html" title="Execute in own thread"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">own_thread</span></code></a>
       for synchronous execution)!
@@ -81,14 +83,12 @@
       
 </p>
 <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
- <span class="identifier">a_function</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">a_function</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
+
 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">(),</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
- <span class="identifier">another_function</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">another_function</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">new_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
 </pre>
 <p>
     </p>

Modified: sandbox/task/libs/task/doc/html/boost_task/own_thread.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/own_thread.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/own_thread.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
 <link rel="home" href="../index.html" title="Chapter 1. Boost.Task">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Task">
-<link rel="prev" href="handle.html" title="Handle">
+<link rel="prev" href="async.html" title="Asynchronous execution">
 <link rel="next" href="new_thread.html" title="Execute in new thread">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="handle.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="new_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="async.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="new_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" title="Execute in own thread">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -53,10 +53,10 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">own_thread</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">fibonacci</span><span class="special">,</span>
- <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">own_thread</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
@@ -73,7 +73,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="handle.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="new_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="async.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="new_thread.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: sandbox/task/libs/task/doc/html/boost_task/pool.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/pool.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/pool.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -61,10 +61,10 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">echo</span><span class="special">,</span>
- <span class="string">"Hello World!"</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="string">"Hello World!"</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
@@ -90,15 +90,14 @@
 <span class="special">{</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">echo</span><span class="special">,</span>
- <span class="string">"Hello World!"</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
+ <span class="string">"Hello World!"</span><span class="special">),</span>
+ <span class="identifier">pool</span><span class="special">)</span> <span class="special">);</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
- .
     </p>
 <div class="important" title="Important"><table border="0" summary="Important">
 <tr>
@@ -108,7 +107,7 @@
 <tr><td align="left" valign="top"><p>
         Tasks should not be too small (performance overhead dominates) and avoid
         blocking tasks
- <sup>[<a name="id575100" href="#ftn.id575100" class="footnote">4</a>]</sup>
+ <sup>[<a name="id598556" href="#ftn.id598556" class="footnote">5</a>]</sup>
         .
       </p></td></tr>
 </table></div>
@@ -184,7 +183,7 @@
         policy (limitation of queued tasks).
       </p>
 <a name="boost_task.pool.channel._code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__task__phrase__phrase_role__special______phrase__phrase_role__identifier__bounded_channel__phrase___code_"></a><h5>
-<a name="id575703"></a>
+<a name="id599159"></a>
         <a class="link" href="pool.html#boost_task.pool.channel._code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__task__phrase__phrase_role__special______phrase__phrase_role__identifier__bounded_channel__phrase___code_"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">bounded_channel</span></code></a>
       </h5>
 <p>
@@ -201,7 +200,7 @@
         will be woken up if the amount of pending tasks reaches <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">low_watermark</span></code>.
       </p>
 <a name="boost_task.pool.channel._code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__task__phrase__phrase_role__special______phrase__phrase_role__identifier__unbounded_channel__phrase___code_"></a><h5>
-<a name="id575935"></a>
+<a name="id599391"></a>
         <a class="link" href="pool.html#boost_task.pool.channel._code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__task__phrase__phrase_role__special______phrase__phrase_role__identifier__unbounded_channel__phrase___code_"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">unbounded_channel</span></code></a>
       </h5>
 <p>
@@ -220,7 +219,7 @@
         The scheduling policy determines how tasks are scheduled inside the <span class="emphasis"><em>channel</em></span>.
       </p>
 <a name="boost_task.pool.scheduling.fifo"></a><h5>
-<a name="id576076"></a>
+<a name="id599532"></a>
         <a class="link" href="pool.html#boost_task.pool.scheduling.fifo">fifo</a>
       </h5>
 <p>
@@ -228,7 +227,7 @@
         gets taken first.
       </p>
 <a name="boost_task.pool.scheduling.priority"></a><h5>
-<a name="id576127"></a>
+<a name="id599583"></a>
         <a class="link" href="pool.html#boost_task.pool.scheduling.priority">priority</a>
       </h5>
 <p>
@@ -244,14 +243,14 @@
 </span><span class="special">&gt;</span> <span class="identifier">pool</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">poolsize</span><span class="special">(</span> <span class="number">5</span><span class="special">)</span> <span class="special">);</span>
 
 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// thread-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">some_fn</span><span class="special">),</span> <span class="comment">// task to be executed
-</span> <span class="number">5</span><span class="special">);</span> <span class="comment">// priority is 5
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">some_fn</span><span class="special">),</span> <span class="comment">// task to be executed
+</span> <span class="number">5</span><span class="special">,</span> <span class="comment">// priority is 5
+</span> <span class="identifier">pool</span><span class="special">);</span> <span class="comment">// thread-pool
 </span>
 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// thread-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">another_fn</span><span class="special">),</span> <span class="comment">// task to be executed
-</span> <span class="number">3</span><span class="special">);</span> <span class="comment">// priority is 3
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">another_fn</span><span class="special">),</span> <span class="comment">// task to be executed
+</span> <span class="number">3</span><span class="special">,</span> <span class="comment">// priority is 3
+</span> <span class="identifier">pool</span><span class="special">);</span> <span class="comment">// thread-pool
 </span></pre>
 <p>
       </p>
@@ -275,7 +274,7 @@
 <p>
       </p>
 <a name="boost_task.pool.scheduling.smart"></a><h5>
-<a name="id576914"></a>
+<a name="id600370"></a>
         <a class="link" href="pool.html#boost_task.pool.scheduling.smart">smart</a>
       </h5>
 <p>
@@ -326,16 +325,17 @@
         <span class="comment">// replaced by later task with same attribute == 2
 </span> <span class="comment">// if still pending in pool
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span>
- <span class="number">2</span><span class="special">);</span> <span class="comment">// attribute is 2
-</span>
+ <span class="number">2</span><span class="special">,</span> <span class="comment">// attribute is 2
+</span> <span class="identifier">pool</span><span class="special">);</span>
+
         <span class="comment">// will replace previous pending task with attribute == 2
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
                 <span class="identifier">pool</span><span class="special">,</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
- <span class="number">2</span><span class="special">);</span> <span class="comment">// attribute is 2 too
-</span><span class="special">}</span>
+ <span class="number">2</span><span class="special">,</span> <span class="comment">// attribute is 2 too
+</span> <span class="identifier">pool</span><span class="special">);</span>
+<span class="special">}</span>
 </pre>
 <p>
       </p>
@@ -352,7 +352,7 @@
         should be addressed.
       </p>
 <a name="boost_task.pool.pool_shutdown.shutdown"></a><h5>
-<a name="id578010"></a>
+<a name="id601477"></a>
         <a class="link" href="pool.html#boost_task.pool.pool_shutdown.shutdown">Shutdown</a>
       </h5>
 <p>
@@ -361,15 +361,6 @@
         are joined until all pending tasks are processed. No futher tasks can be
         submitted.
       </p>
-<div class="note" title="Note"><table border="0" summary="Note">
-<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
-<th align="left">Note</th>
-</tr>
-<tr><td align="left" valign="top"><p>
- The deconstructor calls <code class="computeroutput"><span class="identifier">shutdown</span><span class="special">()</span></code> if the pool was not shutdown yet.
- </p></td></tr>
-</table></div>
 <p>
         
 </p>
@@ -401,14 +392,14 @@
 
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h1</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">pool</span><span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h2</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">pool</span><span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span>
         <span class="identifier">pool</span><span class="special">.</span><span class="identifier">shutdown</span><span class="special">();</span>
 
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
@@ -417,8 +408,17 @@
 </pre>
 <p>
       </p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ The deconstructor calls <code class="computeroutput"><span class="identifier">shutdown</span><span class="special">()</span></code> if the pool was not shutdown yet.
+ </p></td></tr>
+</table></div>
 <a name="boost_task.pool.pool_shutdown.shutdown_immediatly"></a><h5>
-<a name="id579109"></a>
+<a name="id602564"></a>
         <a class="link" href="pool.html#boost_task.pool.pool_shutdown.shutdown_immediatly">Shutdown
         immediatly</a>
       </h5>
@@ -457,14 +457,14 @@
 
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h1</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">pool</span><span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h2</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">,</span> <span class="comment">// asynchronous executor
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">pool</span><span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy
+</span>
         <span class="identifier">pool</span><span class="special">.</span><span class="identifier">shutdown_now</span><span class="special">();</span>
 
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span> <span class="comment">// may throw broken_task or task_interrupted
@@ -508,14 +508,14 @@
 
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h1</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">(),</span> <span class="comment">// asynchronous executor == default-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy == default-pool
+</span>
         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h2</span><span class="special">(</span>
                 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">(),</span> <span class="comment">// asynchronous executor == default-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
-
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">fibonacci_fn</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// execution-policy == default-pool
+</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(10) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h1</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fibonacci(5) == "</span> <span class="special">&lt;&lt;</span> <span class="identifier">h2</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
@@ -670,18 +670,20 @@
         <span class="special">{</span>
                 <span class="comment">// fork a sub-task calculating fibonacci(n-1)
 </span> <span class="identifier">h1</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">parallel_fib</span><span class="special">,</span>
                                 <span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">,</span>
- <span class="identifier">cutof</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">cutof</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">()</span> <span class="special">);</span>
+
                 <span class="comment">// fork a sub-task calculating fibonacci(n-2)
 </span> <span class="identifier">h2</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">(),</span>
                         <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span>
                                 <span class="identifier">parallel_fib</span><span class="special">,</span>
                                 <span class="identifier">n</span> <span class="special">-</span> <span class="number">2</span><span class="special">,</span>
- <span class="identifier">cutof</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">cutof</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">as_sub_task</span><span class="special">()</span> <span class="special">);</span>
+
                 <span class="comment">// join the results of both sub-tasks
 </span> <span class="comment">// if one of the both sub-tasks is not ready
 </span> <span class="comment">// the worker-thread does not block, it executes other
@@ -692,14 +694,14 @@
 
 <span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// handle for fibonacci calculation
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">handle</span><span class="special">&lt;</span> <span class="keyword">long</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">(</span> <span class="comment">// handle for fibonacci calculation
 </span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">(),</span> <span class="comment">// access the default thread-pool
-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// calculate fibonacci number 10
-</span> <span class="identifier">parallel_fib</span><span class="special">,</span> <span class="comment">// for numbers &lt; 5 do inline recursive calculation
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">make_task</span><span class="special">(</span> <span class="comment">// calculate fibonacci number 10
+</span> <span class="identifier">parallel_fib</span><span class="special">,</span> <span class="comment">// for numbers &lt; 5 do inline recursive calculation
 </span> <span class="number">10</span><span class="special">,</span>
- <span class="number">5</span><span class="special">)</span> <span class="special">)</span> <span class="special">);</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">default_pool</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span> <span class="comment">// access the default thread-pool
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">h</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -707,7 +709,7 @@
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id575100" href="#id575100" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id598556" href="#id598556" class="para">5</a>] </sup>
             see <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=216500409" target="_top">'Use
             Thread Pools Correctly'</a>, Herb Sutter
           </p></div>

Modified: sandbox/task/libs/task/doc/html/boost_task/reference.html
==============================================================================
--- sandbox/task/libs/task/doc/html/boost_task/reference.html (original)
+++ sandbox/task/libs/task/doc/html/boost_task/reference.html 2009-06-08 15:38:16 EDT (Mon, 08 Jun 2009)
@@ -29,11 +29,29 @@
 <div class="toc"><dl>
 <dt><span class="section"> Class template task</span></dt>
 <dt><span class="section"> Class template handle</span></dt>
-<dt><span class="section"> Function async()</span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.async"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">EP</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.async1"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">pool</span><span class="special">&lt;</span>
+ <span class="identifier">Channel</span> <span class="special">&gt;</span>
+ <span class="special">&amp;)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.async2"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">Attr</span><span class="special">,</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;)</span></code></a></span></dt>
 <dt><span class="section"> Class own_thread</span></dt>
 <dt><span class="section"> Class new_thread</span></dt>
 <dt><span class="section"> Class template static_pool</span></dt>
-<dt><span class="section"> Utilities</span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.reschedule_until"> Non-member function
+ <code class="computeroutput"><span class="identifier">reschedule_until</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.get_pool"> Non-member function
+ <code class="computeroutput"><span class="identifier">get_pool</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.runs_in_pool"> Non-member function
+ <code class="computeroutput"><span class="identifier">runs_in_pool</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.worker_id"> Non-member function
+ <code class="computeroutput"><span class="identifier">worker_id</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"> Non-member function delay()</span></dt>
+<dt><span class="section"> Non-member function yield()</span></dt>
+<dt><span class="section"><a href="reference.html#boost_task.reference.interrupt"> Non-member function
+ <code class="computeroutput"><span class="identifier">interrupt</span><span class="special">()</span></code></a></span></dt>
 <dt><span class="section"> Meta function has_attribute</span></dt>
 <dt><span class="section"><a href="reference.html#boost_task.reference.attribute_type"> Meta function
       <code class="computeroutput"><span class="identifier">attribute_type</span></code></a></span></dt>
@@ -51,16 +69,6 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_task.reference.task"></a><a class="link" href="reference.html#boost_task.reference.task" title="Class template task"> Class template <code class="computeroutput"><span class="identifier">task</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"> Constructor</span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.task.get_id"> Member function
- <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.task.get_future"> Member function
- <code class="computeroutput"><span class="identifier">get_future</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"> Member function swap()</span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.task.operator"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()()</span></code></a></span></dt>
-</dl></div>
 <p>
         
 </p>
@@ -80,14 +88,22 @@
         <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">other</span><span class="special">)</span> <span class="comment">// throw();
 </span>
         <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()()</span> <span class="comment">// throw();
-</span><span class="special">}</span>
+</span><span class="special">};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Fn</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">A0</span> <span class="special">&gt;</span>
+<span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span> <span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">Fn</span> <span class="identifier">fn</span><span class="special">,</span> <span class="identifier">A0</span> <span class="identifier">a0</span><span class="special">);</span>
+
+<span class="special">...</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Fn</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">A0</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">A10</span> <span class="special">&gt;</span>
+<span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span> <span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">Fn</span> <span class="identifier">fn</span><span class="special">,</span> <span class="identifier">A0</span> <span class="identifier">a0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">A10</span> <span class="identifier">a10</span><span class="special">);</span>
 </pre>
 <p>
       </p>
-<div class="section" title="Constructor">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.task.constructor"></a><a class="link" href="reference.html#boost_task.reference.task.constructor" title="Constructor"> Constructor</a>
-</h4></div></div></div>
+<a name="boost_task.reference.task.constructor"></a><h5>
+<a name="id608452"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.constructor">Constructor</a>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Fn</span> <span class="special">&gt;</span>
 <span class="identifier">task</span><span class="special">(</span> <span class="identifier">Fn</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">fn</span><span class="special">)</span>
 </pre>
@@ -96,21 +112,21 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tp</span><span class="special">::</span><span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span>
- <span class="special">&gt;</span></code> from a function object
- </p></dd>
+ constructs a <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tp</span><span class="special">::</span><span class="identifier">task</span><span class="special">&lt;</span>
+ <span class="identifier">R</span> <span class="special">&gt;</span></code>
+ from a function object
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function get_id()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.task.get_id"></a><a class="link" href="reference.html#boost_task.reference.task.get_id" title="Member function get_id()"> Member function
+<a name="boost_task.reference.task.function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id608615"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_">function
         <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">id</span> <span class="identifier">get_id</span><span class="special">()</span> <span class="keyword">const</span>
 </pre>
 <div class="variablelist">
@@ -118,20 +134,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns task identifier
- </p></dd>
+ returns task identifier
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function get_future()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.task.get_future"></a><a class="link" href="reference.html#boost_task.reference.task.get_future" title="Member function get_future()"> Member function
- <code class="computeroutput"><span class="identifier">get_future</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.task.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id608714"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">get_future</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">shared_future</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">get_future</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -139,19 +154,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns a future assiciated with the task
- </p></dd>
+ returns a future assiciated with the task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- ???
- </p></dd>
+ ???
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function swap()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.task.swap"></a><a class="link" href="reference.html#boost_task.reference.task.swap" title="Member function swap()"> Member function <code class="computeroutput"><span class="identifier">swap</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.task.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id608824"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">swap</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">other</span><span class="special">)</span>
 </pre>
 <div class="variablelist">
@@ -159,20 +174,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- swaps the task
- </p></dd>
+ swaps the task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function operator()()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.task.operator"></a><a class="link" href="reference.html#boost_task.reference.task.operator" title="Member function operator()()"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.task.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special________phrase___code_"></a><h5>
+<a name="id608948"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special________phrase___code_">Member
+ function <code class="computeroutput"><span class="keyword">operator</span><span class="special">()()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()()</span>
 </pre>
 <div class="variablelist">
@@ -180,47 +194,45 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes tasks internal function object
- </p></dd>
+ executes tasks internal function object
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
+<a name="boost_task.reference.task.free_function__code__phrase_role__identifier__make_task__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id609037"></a>
+ <a class="link" href="reference.html#boost_task.reference.task.free_function__code__phrase_role__identifier__make_task__phrase__phrase_role__special______phrase___code_">Free
+ function <code class="computeroutput"><span class="identifier">make_task</span><span class="special">()</span></code></a>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Fn</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">A0</span> <span class="special">&gt;</span>
+<span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span> <span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">Fn</span> <span class="identifier">fn</span><span class="special">,</span> <span class="identifier">A0</span> <span class="identifier">a0</span><span class="special">);</span>
+
+<span class="special">...</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Fn</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">A0</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">typename</span> <span class="identifier">A10</span> <span class="special">&gt;</span>
+<span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span> <span class="identifier">make_task</span><span class="special">(</span> <span class="identifier">Fn</span> <span class="identifier">fn</span><span class="special">,</span> <span class="identifier">A0</span> <span class="identifier">a0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">A10</span> <span class="identifier">a10</span><span class="special">);</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Effects:</span></dt>
+<dd><p>
+ creates an task from function object and arguments
+ </p></dd>
+<dt><span class="term">Throws:</span></dt>
+<dd><p>
+ Nothing
+ </p></dd>
+</dl>
 </div>
 </div>
 <div class="section" title="Class template handle">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_task.reference.handle"></a><a class="link" href="reference.html#boost_task.reference.handle" title="Class template handle"> Class template <code class="computeroutput"><span class="identifier">handle</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"> Constructor</span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.get_id"> Member function
- <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.interruption_requested">
- Member function <code class="computeroutput"><span class="identifier">interruption_requested</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.interrupt"> Member function
- <code class="computeroutput"><span class="identifier">interrupt</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.interrupt_and_wait"> Member
- function <code class="computeroutput"><span class="identifier">interrupt_and_wait</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.interrupt_and_wait_until">
- Member function <code class="computeroutput"><span class="identifier">interrupt_and_wait_until</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.interrupt_and_wait_for">
- Member function <code class="computeroutput"><span class="identifier">interrupt_and_wait_for</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.get"> Member function
- <code class="computeroutput"><span class="identifier">get</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.wait"> Member function
- <code class="computeroutput"><span class="identifier">wait</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.is_ready"> Member function
- <code class="computeroutput"><span class="identifier">is_ready</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.has_value"> Member function
- <code class="computeroutput"><span class="identifier">has_value</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.has_exception"> Member
- function <code class="computeroutput"><span class="identifier">has_exception</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.handle.swap"> Member function
- <code class="computeroutput"><span class="identifier">swap</span><span class="special">()</span></code></a></span></dt>
-</dl></div>
 <p>
         
 </p>
@@ -254,15 +266,47 @@
 
         <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
 
+ <span class="identifier">shared_future</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">get_future</span><span class="special">();</span>
+
         <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
 <span class="special">};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">Iterator</span> <span class="identifier">begin</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">end</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">T1</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">T2</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class="special">&gt;</span> <span class="s
pecial">&amp;</span> <span class="identifier">t4</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T5</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class="special">&gt;</span> <span class="s
pecial">&amp;</span> <span class="identifier">t4</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T5</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t5</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="identifier">Iterator</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">Iterator</span> <span class="identifier">begin</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">end</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class
="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T5</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class
="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T5</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t5</span><span class="special">);</span>
 </pre>
 <p>
       </p>
-<div class="section" title="Constructor">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.constructor"></a><a class="link" href="reference.html#boost_task.reference.handle.constructor" title="Constructor"> Constructor</a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.constructor"></a><h5>
+<a name="id611827"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.constructor">Constructor</a>
+ </h5>
 <pre class="programlisting"><span class="identifier">handle</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -270,20 +314,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs an empty (invalid) handle
- </p></dd>
+ constructs an empty (invalid) handle
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function get_id()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.get_id"></a><a class="link" href="reference.html#boost_task.reference.handle.get_id" title="Member function get_id()"> Member function
- <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id611893"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__get_id__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">get_id</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">const</span> <span class="identifier">id</span> <span class="identifier">get_id</span><span class="special">()</span> <span class="keyword">const</span>
 </pre>
 <div class="variablelist">
@@ -291,20 +334,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns identifier of the associated task
- </p></dd>
+ returns identifier of the associated task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function interruption_requested()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.interruption_requested"></a><a class="link" href="reference.html#boost_task.reference.handle.interruption_requested" title="Member function interruption_requested()">
- Member function <code class="computeroutput"><span class="identifier">interruption_requested</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__interruption_requested__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id611992"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__interruption_requested__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">interruption_requested</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">interruption_requested</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -312,20 +354,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- checks if interruption is already requested
- </p></dd>
+ checks if interruption is already requested
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function interrupt()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.interrupt"></a><a class="link" href="reference.html#boost_task.reference.handle.interrupt" title="Member function interrupt()"> Member function
- <code class="computeroutput"><span class="identifier">interrupt</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612081"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">interrupt</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">interrupt</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -333,20 +374,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- requests task interruption; doesn not block (immediatly returns)
- </p></dd>
+ requests task interruption; doesn not block (immediatly returns)
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- ???
- </p></dd>
+ ???
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function interrupt_and_wait()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.interrupt_and_wait"></a><a class="link" href="reference.html#boost_task.reference.handle.interrupt_and_wait" title="Member function interrupt_and_wait()"> Member
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612170"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait__phrase__phrase_role__special______phrase___code_">Member
         function <code class="computeroutput"><span class="identifier">interrupt_and_wait</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">interrupt_and_wait</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -354,20 +394,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- requests task interruption and blocks until worker-thread stops task
- </p></dd>
+ requests task interruption and blocks until worker-thread stops task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- ???
- </p></dd>
+ ???
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function interrupt_and_wait_until()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.interrupt_and_wait_until"></a><a class="link" href="reference.html#boost_task.reference.handle.interrupt_and_wait_until" title="Member function interrupt_and_wait_until()">
- Member function <code class="computeroutput"><span class="identifier">interrupt_and_wait_until</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_until__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612259"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_until__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">interrupt_and_wait_until</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">interrupt_and_wait_until</span><span class="special">(</span> <span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">)</span>
 </pre>
 <div class="variablelist">
@@ -375,21 +414,20 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- requests task interruption and blocks until worker-thread stops task
- or time-point elapsed
- </p></dd>
+ requests task interruption and blocks until worker-thread stops task
+ or time-point elapsed
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- ???
- </p></dd>
+ ???
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function interrupt_and_wait_for()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.interrupt_and_wait_for"></a><a class="link" href="reference.html#boost_task.reference.handle.interrupt_and_wait_for" title="Member function interrupt_and_wait_for()">
- Member function <code class="computeroutput"><span class="identifier">interrupt_and_wait_for</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_for__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612375"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__interrupt_and_wait_for__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">interrupt_and_wait_for</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
 <span class="keyword">void</span> <span class="identifier">interrupt_and_wait_for</span><span class="special">(</span> <span class="identifier">Duration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">)</span>
 </pre>
@@ -398,21 +436,20 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- requests task interruption and blocks until worker-thread stops task
- or time-duration elapsed
- </p></dd>
+ requests task interruption and blocks until worker-thread stops task
+ or time-duration elapsed
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- ???
- </p></dd>
+ ???
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function get()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.get"></a><a class="link" href="reference.html#boost_task.reference.handle.get" title="Member function get()"> Member function
- <code class="computeroutput"><span class="identifier">get</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__get__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612518"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__get__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">get</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">R</span> <span class="identifier">get</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -420,20 +457,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- requests the result
- </p></dd>
+ requests the result
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- task_interrupted, task_uninialized
- </p></dd>
+ task_interrupted, task_uninialized
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function wait()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.wait"></a><a class="link" href="reference.html#boost_task.reference.handle.wait" title="Member function wait()"> Member function
- <code class="computeroutput"><span class="identifier">wait</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__wait__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612605"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__wait__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">wait</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">wait</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -441,20 +477,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- blocks caller until task is done
- </p></dd>
+ blocks caller until task is done
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- task_interrupted, task_uninialized
- </p></dd>
+ task_interrupted, task_uninialized
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function is_ready()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.is_ready"></a><a class="link" href="reference.html#boost_task.reference.handle.is_ready" title="Member function is_ready()"> Member function
- <code class="computeroutput"><span class="identifier">is_ready</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__is_ready__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612693"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__is_ready__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">is_ready</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_ready</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -462,20 +497,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- checks if task is done
- </p></dd>
+ checks if task is done
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function has_value()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.has_value"></a><a class="link" href="reference.html#boost_task.reference.handle.has_value" title="Member function has_value()"> Member function
- <code class="computeroutput"><span class="identifier">has_value</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_value__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612780"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__has_value__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">has_value</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">has_value</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -483,20 +517,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- checks if task is done and a result value is set
- </p></dd>
+ checks if task is done and a result value is set
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function has_exception()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.has_exception"></a><a class="link" href="reference.html#boost_task.reference.handle.has_exception" title="Member function has_exception()"> Member
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__has_exception__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612868"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__has_exception__phrase__phrase_role__special______phrase___code_">Member
         function <code class="computeroutput"><span class="identifier">has_exception</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">has_exception</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -504,20 +537,39 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- checks if task is done and an exception is set
- </p></dd>
+ checks if task is done and an exception is set
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id612957"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__get_future__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">get_future</span><span class="special">()</span></code></a>
+ </h5>
+<pre class="programlisting"><span class="identifier">shared_future</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">get_future</span><span class="special">()</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Effects:</span></dt>
+<dd><p>
+ returns a reference to the internal shared_future&lt; R &gt;
+ </p></dd>
+<dt><span class="term">Throws:</span></dt>
+<dd><p>
+ Nothing
+ </p></dd>
+</dl>
 </div>
-<div class="section" title="Member function swap()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.handle.swap"></a><a class="link" href="reference.html#boost_task.reference.handle.swap" title="Member function swap()"> Member function
- <code class="computeroutput"><span class="identifier">swap</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.handle.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id613067"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.member_function__code__phrase_role__identifier__swap__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">swap</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">other</span><span class="special">)</span>
 </pre>
 <div class="variablelist">
@@ -525,146 +577,177 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- swapps handle
- </p></dd>
+ swapps handle
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
+<a name="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_all__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id613193"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_all__phrase__phrase_role__special______phrase___code_">Non-member
+ function <code class="computeroutput"><span class="identifier">wait_for_all</span><span class="special">()</span></code></a>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">Iterator</span> <span class="identifier">begin</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">end</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">T1</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">T2</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class="special">&gt;</span> <span class="s
pecial">&amp;</span> <span class="identifier">t4</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T5</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">void</span> <span class="identifier">waitfor_all</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class="special">&gt;</span> <span class="s
pecial">&amp;</span> <span class="identifier">t4</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T5</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t5</span><span class="special">);</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Effects:</span></dt>
+<dd><p>
+ waits for all handles to become ready
+ </p></dd>
+<dt><span class="term">Throws:</span></dt>
+<dd><p>
+ Nothing
+ </p></dd>
+</dl>
 </div>
+<a name="boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_any__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id614186"></a>
+ <a class="link" href="reference.html#boost_task.reference.handle.non_member_function__code__phrase_role__identifier__wait_for_any__phrase__phrase_role__special______phrase___code_">Non-member
+ function <code class="computeroutput"><span class="identifier">wait_for_any</span><span class="special">()</span></code></a>
+ </h5>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Iterator</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="identifier">Iterator</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">Iterator</span> <span class="identifier">begin</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">end</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class
="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T3</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T4</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T5</span> <span class="special">&gt;</span>
+<span class="keyword">friend</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">waitfor_any</span><span class="special">(</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T1</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t2</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T3</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t3</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T4</span> <span class
="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t4</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">T5</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">t5</span><span class="special">);</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Effects:</span></dt>
+<dd><p>
+ waits for any handle to become ready
+ </p></dd>
+<dt><span class="term">Throws:</span></dt>
+<dd><p>
+ Nothing
+ </p></dd>
+</dl>
 </div>
-<div class="section" title="Function async()">
+</div>
+<div class="section" title="Non-member function async( task&lt; R &gt;, EP)">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_task.reference.async"></a><a class="link" href="reference.html#boost_task.reference.async" title="Function async()"> Function <code class="computeroutput"><span class="identifier">async</span><span class="special">()</span></code></a>
+<a name="boost_task.reference.async"></a><a class="link" href="reference.html#boost_task.reference.async" title="Non-member function async( task&lt; R &gt;, EP)"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">EP</span><span class="special">)</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="reference.html#boost_task.reference.async.async_default"> Templated
- non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">AE</span><span class="special">,</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;)</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.async.async_pool"> Templated non-member
- function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">&lt;</span>
- <span class="identifier">Channel</span> <span class="special">&gt;</span>
- <span class="special">&amp;,</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;)</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.async.async_pool_attr"> Templated
- non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span>
- <span class="special">&gt;</span> <span class="special">&amp;,</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;,</span>
- <span class="identifier">Attr</span><span class="special">)</span></code></a></span></dt>
-</dl></div>
-<div class="section" title="Templated non-member function async( AE, task&lt; R &gt;)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.async.async_default"></a><a class="link" href="reference.html#boost_task.reference.async.async_default" title="Templated non-member function async( AE, task&lt; R &gt;)"> Templated
- non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">AE</span><span class="special">,</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;)</span></code></a>
-</h4></div></div></div>
 <p>
-
+
 </p>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">task</span><span class="special">/</span><span class="identifier">async</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
-<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">AE</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">R</span> <span class="special">&gt;</span>
-<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">AE</span> <span class="identifier">ae</span><span class="special">,</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">EP</span> <span class="special">&gt;</span>
+<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">EP</span> <span class="identifier">ep</span><span class="special">);</span>
 </pre>
 <p>
- </p>
+ </p>
 <div class="variablelist">
 <p class="title"><b></b></p>
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes task in an asyncrounous executer and returns a handle associated
- with the task
- </p></dd>
+ executes task in an asyncrounous executer and returns a handle associated
+ with the task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
-<div class="section" title="Templated non-member function async( pool&lt; Channel &gt; &amp;, task&lt; R &gt;)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.async.async_pool"></a><a class="link" href="reference.html#boost_task.reference.async.async_pool" title="Templated non-member function async( pool&lt; Channel &gt; &amp;, task&lt; R &gt;)"> Templated non-member
- function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span>
- <span class="identifier">pool</span><span class="special">&lt;</span>
- <span class="identifier">Channel</span> <span class="special">&gt;</span>
- <span class="special">&amp;,</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;)</span></code></a>
-</h4></div></div></div>
+<div class="section" title="Non-member function async( task&lt; R &gt;, pool&lt; Channel &gt; &amp;)">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_task.reference.async1"></a><a class="link" href="reference.html#boost_task.reference.async1" title="Non-member function async( task&lt; R &gt;, pool&lt; Channel &gt; &amp;)"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">pool</span><span class="special">&lt;</span>
+ <span class="identifier">Channel</span> <span class="special">&gt;</span>
+ <span class="special">&amp;)</span></code></a>
+</h3></div></div></div>
 <p>
-
+
 </p>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">task</span><span class="special">/</span><span class="identifier">async</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
 <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Channel</span> <span class="special">&gt;</span>
-<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">ae</span><span class="special">,</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">);</span>
+<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">ep</span><span class="special">);</span>
 </pre>
 <p>
- </p>
+ </p>
 <div class="variablelist">
 <p class="title"><b></b></p>
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes task in a thread-pool and returns a handle associated with
- the task
- </p></dd>
+ executes task in a thread-pool and returns a handle associated with the
+ task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
-<div class="section" title="Templated non-member function async( pool&lt; Channel &gt; &amp;, task&lt; R &gt;, Attr)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.async.async_pool_attr"></a><a class="link" href="reference.html#boost_task.reference.async.async_pool_attr" title="Templated non-member function async( pool&lt; Channel &gt; &amp;, task&lt; R &gt;, Attr)"> Templated
- non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span>
- <span class="special">&gt;</span> <span class="special">&amp;,</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;,</span>
- <span class="identifier">Attr</span><span class="special">)</span></code></a>
-</h4></div></div></div>
+<div class="section" title="Non-member function async( task&lt; R &gt;, Attr, pool&lt; Channel &gt; &amp;)">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_task.reference.async2"></a><a class="link" href="reference.html#boost_task.reference.async2" title="Non-member function async( task&lt; R &gt;, Attr, pool&lt; Channel &gt; &amp;)"> Non-member function <code class="computeroutput"><span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;,</span>
+ <span class="identifier">Attr</span><span class="special">,</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;)</span></code></a>
+</h3></div></div></div>
 <p>
-
+
 </p>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">task</span><span class="special">/</span><span class="identifier">async</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
 <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Channel</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Attr</span> <span class="special">&gt;</span>
-<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">ae</span><span class="special">,</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">Attr</span> <span class="identifier">attr</span><span class="special">);</span>
+<span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">async</span><span class="special">(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">,</span> <span class="identifier">Attr</span> <span class="identifier">attr</span><span class="special">,</span> <span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">Channel</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">ep</span><span class="special">);</span>
 </pre>
 <p>
- </p>
+ </p>
 <div class="variablelist">
 <p class="title"><b></b></p>
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes atrributed task in a thread-pool and returns a handle associated
- with the task
- </p></dd>
+ executes atrributed task in a thread-pool and returns a handle associated
+ with the task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
-</div>
 <div class="section" title="Class own_thread">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_task.reference.own_thread"></a><a class="link" href="reference.html#boost_task.reference.own_thread" title="Class own_thread"> Class <code class="computeroutput"><span class="identifier">own_thread</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_task.reference.own_thread.operator"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;</span>
- <span class="identifier">t</span><span class="special">)</span></code></a></span></dt></dl></div>
 <p>
         
 </p>
@@ -678,14 +761,14 @@
 </pre>
 <p>
       </p>
-<div class="section" title="Member function operator()( task&lt; R &gt; t)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.own_thread.operator"></a><a class="link" href="reference.html#boost_task.reference.own_thread.operator" title="Member function operator()( task&lt; R &gt; t)"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
+<a name="boost_task.reference.own_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_"></a><h5>
+<a name="id616358"></a>
+ <a class="link" href="reference.html#boost_task.reference.own_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_">Member
+ function <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
         <span class="identifier">task</span><span class="special">&lt;</span>
         <span class="identifier">R</span> <span class="special">&gt;</span>
         <span class="identifier">t</span><span class="special">)</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span> <span class="special">&gt;</span>
 <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">)</span>
 </pre>
@@ -694,26 +777,20 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes task in the current thread an returns an handle associated
- with the task
- </p></dd>
+ executes task in the current thread an returns an handle associated with
+ the task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
-</div>
 <div class="section" title="Class new_thread">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_task.reference.new_thread"></a><a class="link" href="reference.html#boost_task.reference.new_thread" title="Class new_thread"> Class <code class="computeroutput"><span class="identifier">new_thread</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_task.reference.new_thread.operator"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
- <span class="identifier">task</span><span class="special">&lt;</span>
- <span class="identifier">R</span> <span class="special">&gt;</span>
- <span class="identifier">t</span><span class="special">)</span></code></a></span></dt></dl></div>
 <p>
         
 </p>
@@ -727,14 +804,14 @@
 </pre>
 <p>
       </p>
-<div class="section" title="Member function operator()( task&lt; R &gt; t)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.new_thread.operator"></a><a class="link" href="reference.html#boost_task.reference.new_thread.operator" title="Member function operator()( task&lt; R &gt; t)"> Member function
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
+<a name="boost_task.reference.new_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_"></a><h5>
+<a name="id616754"></a>
+ <a class="link" href="reference.html#boost_task.reference.new_thread.member_function__code__phrase_role__keyword__operator__phrase__phrase_role__special_______phrase___phrase_role__identifier__task__phrase__phrase_role__special___lt___phrase___phrase_role__identifier__r__phrase___phrase_role__special___gt___phrase___phrase_role__identifier__t__phrase__phrase_role__special_____phrase___code_">Member
+ function <code class="computeroutput"><span class="keyword">operator</span><span class="special">()(</span>
         <span class="identifier">task</span><span class="special">&lt;</span>
         <span class="identifier">R</span> <span class="special">&gt;</span>
         <span class="identifier">t</span><span class="special">)</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span> <span class="special">&gt;</span>
 <span class="identifier">handle</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">task</span><span class="special">&lt;</span> <span class="identifier">R</span> <span class="special">&gt;</span> <span class="identifier">t</span><span class="special">)</span>
 </pre>
@@ -743,68 +820,20 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- executes task in a new thread an returns an handle associated with
- the task
- </p></dd>
+ executes task in a new thread an returns an handle associated with the
+ task
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
-</div>
 <div class="section" title="Class template static_pool">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_task.reference.static_pool"></a><a class="link" href="reference.html#boost_task.reference.static_pool" title="Class template static_pool"> Class template <code class="computeroutput"><span class="identifier">static_pool</span></code></a>
 </h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.constructor_unbounded_channel_hw">
- Constructor (unbounded channel)</a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.constructor_unbounded_channel">
- Constructor (unbounded channel)</a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.constructor_bounded_channel_hw">
- Constructor (bounded channel)</a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.constructor_bounded_channel">
- Constructor (bounded channel)</a></span></dt>
-<dt><span class="section"> Destructor</span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.size"> Member function
- <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.active"> Member function
- <code class="computeroutput"><span class="identifier">active</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.idle"> Member function
- <code class="computeroutput"><span class="identifier">idle</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.shutdown"> Member
- function <code class="computeroutput"><span class="identifier">shutdown</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.shutdown_now"> Member
- function <code class="computeroutput"><span class="identifier">shutdown_now</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.losed"> Member function
- <code class="computeroutput"><span class="identifier">closed</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.clear"> Member function
- <code class="computeroutput"><span class="identifier">clear</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.empty"> Member function
- <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.pending"> Member function
- <code class="computeroutput"><span class="identifier">pending</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.get_upper_bound">
- Member function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.set_upper_bound">
- Member function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span> <span class="identifier">high_watermark</span>
- <span class="keyword">const</span><span class="special">&amp;</span>
- <span class="identifier">hwm</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.get_lower_bound">
- Member function <code class="computeroutput"><span class="identifier">lower_bound</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.set_lower_bound">
- Member function <code class="computeroutput"><span class="identifier">lower_bound</span><span class="special">(</span> <span class="identifier">low_watermark</span>
- <span class="keyword">const</span><span class="special">&amp;</span>
- <span class="identifier">lwm</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.submit"> Member function
- <code class="computeroutput"><span class="identifier">submit</span><span class="special">(</span>
- <span class="identifier">Act</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">act</span><span class="special">)</span></code></a></span></dt>
-<dt><span class="section"><a href="reference.html#boost_task.reference.static_pool.submit_attr"> Member
- function <code class="computeroutput"><span class="identifier">submit</span><span class="special">(</span>
- <span class="identifier">Act</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">act</span><span class="special">,</span> <span class="identifier">Attr</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span></code></a></span></dt>
-</dl></div>
 <p>
         
 </p>
@@ -865,11 +894,11 @@
 </pre>
 <p>
       </p>
-<div class="section" title="Constructor (unbounded channel)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.constructor_unbounded_channel_hw"></a><a class="link" href="reference.html#boost_task.reference.static_pool.constructor_unbounded_channel_hw" title="Constructor (unbounded channel)">
- Constructor (unbounded channel)</a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.constructor__unbounded_channel_"></a><h5>
+<a name="id618368"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.constructor__unbounded_channel_">Constructor
+ (unbounded channel)</a>
+ </h5>
 <pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">static_pool</span><span class="special">(</span>
         <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">asleep</span> <span class="special">=</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">(</span> <span class="number">10</span><span class="special">),</span>
         <span class="identifier">scanns</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">scns</span> <span class="special">=</span> <span class="identifier">scanns</span><span class="special">(</span> <span class="number">20</span><span class="special">)</span> <span class="special">)</span>
@@ -879,30 +908,29 @@
 <dl>
 <dt><span class="term">Preconditions:</span></dt>
 <dd><p>
- operating system provides functionality for processor pining
- </p></dd>
+ operating system provides functionality for processor pining
+ </p></dd>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs a pool - for each processor a worker-thread is created and
- bound to one processor - global-queue can queue an unlimited number
- of tasks
- </p></dd>
+ constructs a pool - for each processor a worker-thread is created and
+ bound to one processor - global-queue can queue an unlimited number of
+ tasks
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- constructor has to be called if a unbounded-channel is used
- </p></dd>
+ constructor has to be called if a unbounded-channel is used
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Constructor (unbounded channel)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.constructor_unbounded_channel"></a><a class="link" href="reference.html#boost_task.reference.static_pool.constructor_unbounded_channel" title="Constructor (unbounded channel)">
- Constructor (unbounded channel)</a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.constructor__unbounded_channel_poolsize_"></a><h5>
+<a name="id618643"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.constructor__unbounded_channel_poolsize_">Constructor
+ (unbounded channel/poolsize)</a>
+ </h5>
 <pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">static_pool</span><span class="special">(</span>
         <span class="identifier">poolsize</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">psize</span><span class="special">,</span>
         <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">asleep</span> <span class="special">=</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">(</span> <span class="number">10</span><span class="special">),</span>
@@ -913,25 +941,24 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs a pool containing psize worker-threads - global-queue can
- queue an unlimited number of tasks
- </p></dd>
+ constructs a pool containing psize worker-threads - global-queue can
+ queue an unlimited number of tasks
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- constructor has to be called if a unbounded-channel is used
- </p></dd>
+ constructor has to be called if a unbounded-channel is used
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Constructor (bounded channel)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.constructor_bounded_channel_hw"></a><a class="link" href="reference.html#boost_task.reference.static_pool.constructor_bounded_channel_hw" title="Constructor (bounded channel)">
- Constructor (bounded channel)</a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.constructor__bounded_channel_"></a><h5>
+<a name="id618929"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.constructor__bounded_channel_">Constructor
+ (bounded channel)</a>
+ </h5>
 <pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">static_pool</span><span class="special">(</span>
         <span class="identifier">high_watermark</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">hwm</span><span class="special">,</span>
         <span class="identifier">low_watermark</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lwm</span><span class="special">,</span>
@@ -943,31 +970,30 @@
 <dl>
 <dt><span class="term">Preconditions:</span></dt>
 <dd><p>
- operating system provides functionality for processor pining
- </p></dd>
+ operating system provides functionality for processor pining
+ </p></dd>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs a pool - for each processor a worker-thread is created and
- bound to one processor - global-queue can only queue a limited number
- of tasks
- </p></dd>
+ constructs a pool - for each processor a worker-thread is created and
+ bound to one processor - global-queue can only queue a limited number
+ of tasks
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>,
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>,
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- Constructor has to be called if a bounded-channel is used.
- </p></dd>
+ Constructor has to be called if a bounded-channel is used.
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Constructor (bounded channel)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.constructor_bounded_channel"></a><a class="link" href="reference.html#boost_task.reference.static_pool.constructor_bounded_channel" title="Constructor (bounded channel)">
- Constructor (bounded channel)</a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.constructor__bounded_channel_poolsize_"></a><h5>
+<a name="id619283"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.constructor__bounded_channel_poolsize_">Constructor
+ (bounded channel/poolsize)</a>
+ </h5>
 <pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">static_pool</span><span class="special">(</span>
         <span class="identifier">poolsize</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">psize</span><span class="special">,</span>
         <span class="identifier">high_watermark</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">hwm</span><span class="special">,</span>
@@ -980,25 +1006,24 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- constructs a pool containing psize worker-threads - global-queue can
- only queue a limited number of tasks
- </p></dd>
+ constructs a pool containing psize worker-threads - global-queue can
+ only queue a limited number of tasks
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>,
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_scanns</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_timeduration</span></code>,
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- constructor has to be called if a bounded-channel is used
- </p></dd>
+ constructor has to be called if a bounded-channel is used
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Destructor">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.destructor"></a><a class="link" href="reference.html#boost_task.reference.static_pool.destructor" title="Destructor"> Destructor</a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.destructor"></a><h5>
+<a name="id619650"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.destructor">Destructor</a>
+ </h5>
 <pre class="programlisting"><span class="special">~</span><span class="identifier">static_pool</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1006,20 +1031,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- calls <code class="computeroutput"><span class="special">:</span><span class="identifier">shutdown</span><span class="special">()</span></code> if not already called
- </p></dd>
+ calls <code class="computeroutput"><span class="special">:</span><span class="identifier">shutdown</span><span class="special">()</span></code> if not already called
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function size()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.size"></a><a class="link" href="reference.html#boost_task.reference.static_pool.size" title="Member function size()"> Member function
- <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__size__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id619741"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__size__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1027,20 +1051,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns how many worker-threads are running in the pool
- </p></dd>
+ returns how many worker-threads are running in the pool
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function active()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.active"></a><a class="link" href="reference.html#boost_task.reference.static_pool.active" title="Member function active()"> Member function
- <code class="computeroutput"><span class="identifier">active</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__active__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id619839"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__active__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">active</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">active</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1048,20 +1071,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns how many worker-threads are active (executing an task)
- </p></dd>
+ returns how many worker-threads are active (executing an task)
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function idle()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.idle"></a><a class="link" href="reference.html#boost_task.reference.static_pool.idle" title="Member function idle()"> Member function
- <code class="computeroutput"><span class="identifier">idle</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__idle__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id619936"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__idle__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">idle</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">idle</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1069,24 +1091,23 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns how many worker-threads are idle (not executing an task).
- </p></dd>
+ returns how many worker-threads are idle (not executing an task).
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- The value is the difference of <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">active</span><span class="special">()</span></code>
- </p></dd>
+ The value is the difference of <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">active</span><span class="special">()</span></code>
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function shutdown()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.shutdown"></a><a class="link" href="reference.html#boost_task.reference.static_pool.shutdown" title="Member function shutdown()"> Member
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620077"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown__phrase__phrase_role__special______phrase___code_">Member
         function <code class="computeroutput"><span class="identifier">shutdown</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">shutdown</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1094,25 +1115,23 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- deactivates the channel and joins all worker-threads - the pool is
- closed
- </p></dd>
+ deactivates the channel and joins all worker-threads - the pool is closed
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- all pending tasks are processed
- </p></dd>
+ all pending tasks are processed
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function shutdown_now()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.shutdown_now"></a><a class="link" href="reference.html#boost_task.reference.static_pool.shutdown_now" title="Member function shutdown_now()"> Member
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown_now__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620178"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__shutdown_now__phrase__phrase_role__special______phrase___code_">Member
         function <code class="computeroutput"><span class="identifier">shutdown_now</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">shutdown_now</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1120,25 +1139,24 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- deactivates the channel, send interruption request to all worker-threads
- and joins them - the pool is closed
- </p></dd>
+ deactivates the channel, send interruption request to all worker-threads
+ and joins them - the pool is closed
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- pending tasks are not processed but returned
- </p></dd>
+ pending tasks are not processed but returned
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function closed()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.losed"></a><a class="link" href="reference.html#boost_task.reference.static_pool.losed" title="Member function closed()"> Member function
- <code class="computeroutput"><span class="identifier">closed</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__closed__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620280"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__closed__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">closed</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">closed</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1146,20 +1164,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- queries if the pool is closed (pool is shutdown)
- </p></dd>
+ queries if the pool is closed (pool is shutdown)
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function clear()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.clear"></a><a class="link" href="reference.html#boost_task.reference.static_pool.clear" title="Member function clear()"> Member function
- <code class="computeroutput"><span class="identifier">clear</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__clear__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620368"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__clear__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">clear</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">clear</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1167,20 +1184,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- removes all pending tasks from the channel
- </p></dd>
+ removes all pending tasks from the channel
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function empty()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.empty"></a><a class="link" href="reference.html#boost_task.reference.static_pool.empty" title="Member function empty()"> Member function
- <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__empty__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620456"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__empty__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1188,20 +1204,19 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- queries if the channel is empty
- </p></dd>
+ queries if the channel is empty
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function pending()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.pending"></a><a class="link" href="reference.html#boost_task.reference.static_pool.pending" title="Member function pending()"> Member function
- <code class="computeroutput"><span class="identifier">pending</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__pending__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620544"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__pending__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">pending</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">pending</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1209,21 +1224,20 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- queries how many tasks are pending (still unprocessed) in the global-queue
- (channel)
- </p></dd>
+ queries how many tasks are pending (still unprocessed) in the global-queue
+ (channel)
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function upper_bound()">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.get_upper_bound"></a><a class="link" href="reference.html#boost_task.reference.static_pool.get_upper_bound" title="Member function upper_bound()">
- Member function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">()</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special______phrase___code_"></a><h5>
+<a name="id620641"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special______phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">()</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">upper_bound</span><span class="special">()</span>
 </pre>
 <div class="variablelist">
@@ -1231,30 +1245,28 @@
 <dl>
 <dt><span class="term">Preconditions:</span></dt>
 <dd><p>
- channel is of type bounded-channel
- </p></dd>
+ channel is of type bounded-channel
+ </p></dd>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- returns the upper bound of the bounded-channel
- </p></dd>
+ returns the upper bound of the bounded-channel
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- can only be used if a bounded-channel is used
- </p></dd>
+ can only be used if a bounded-channel is used
+ </p></dd>
 </dl>
 </div>
-</div>
-<div class="section" title="Member function upper_bound( high_watermark const&amp; hwm)">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_task.reference.static_pool.set_upper_bound"></a><a class="link" href="reference.html#boost_task.reference.static_pool.set_upper_bound" title="Member function upper_bound( high_watermark const&amp; hwm)">
- Member function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span> <span class="identifier">high_watermark</span>
- <span class="keyword">const</span><span class="special">&amp;</span>
- <span class="identifier">hwm</span><span class="special">)</span></code></a>
-</h4></div></div></div>
+<a name="boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__high_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__hwm__phrase__phrase_role__special_____phrase___code_"></a><h5>
+<a name="id620762"></a>
+ <a class="link" href="reference.html#boost_task.reference.static_pool.member_function__code__phrase_role__identifier__upper_bound__phrase__phrase_role__special_____phrase___phrase_role__identifier__high_watermark__phrase___phrase_role__keyword__const__phrase__phrase_role__special___amp___phrase___phrase_role__identifier__hwm__phrase__phrase_role__special_____phrase___code_">Member
+ function <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span>
+ <span class="identifier">high_watermark</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">hwm</span><span class="special">)</span></code></a>
+ </h5>
 <pre class="programlisting"><span class="keyword">void</span> <span class="identifier">upper_bound</span><span class="special">(</span> <span class="identifier">high_watermark</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">hwm</span><span class="special">)</span>
 </pre>
 <div class="variablelist">
@@ -1262,33 +1274,32 @@
 <dl>
 <dt><span class="term">Preconditions:</span></dt>
 <dd><p>
- channel is of type bounded-channel
- </p></dd>
+ channel is of type bounded-channel
+ </p></dd>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- sets the upper bound of the bounded-channel
- </p></dd>
+ sets the upper bound of the bounded-channel
+ </p></dd>
 <dt><span class="term">Postconditions:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">upper_bound</span><span class="special">()</span>
- <span class="special">==</span> <span class="identifier">hwm</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">upper_bound</span><span class="special">()</span>
+ <span class="special">==</span> <span class="identifier">hwm</span></code>
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
- </p></dd>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">task</span><span class="special">::</span><span class="identifier">invalid_watermark</span></code>
+ </p></dd>
 <dt><span class="term">Notes:</span></dt>
 <dd><p>
- can only be used