Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53068 - in sandbox/task: boost/task boost/task/detail libs/task/doc libs/task/src
From: oliver.kowalke_at_[hidden]
Date: 2009-05-17 03:35:15


Author: olli
Date: 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
New Revision: 53068
URL: http://svn.boost.org/trac/boost/changeset/53068

Log:
* handle, interrupter: renaming of interrupt_and_wait()
* documentation updated

Text files modified:
   sandbox/task/boost/task/detail/interrupter.hpp | 10 +++++-----
   sandbox/task/boost/task/handle.hpp | 18 +++++++++---------
   sandbox/task/libs/task/doc/async_completion_token.qbk | 3 +++
   sandbox/task/libs/task/doc/boost_task.qbk | 14 ++++++++------
   sandbox/task/libs/task/doc/handle.qbk | 34 +++++++++++++++++++++++++++++++++-
   sandbox/task/libs/task/doc/overview.qbk | 16 ++++++++--------
   sandbox/task/libs/task/doc/task.qbk | 10 +++++-----
   sandbox/task/libs/task/src/interrupter.cpp | 4 ++--
   8 files changed, 73 insertions(+), 36 deletions(-)

Modified: sandbox/task/boost/task/detail/interrupter.hpp
==============================================================================
--- sandbox/task/boost/task/detail/interrupter.hpp (original)
+++ sandbox/task/boost/task/detail/interrupter.hpp 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -50,10 +50,10 @@
 
                 void interrupt_and_wait();
 
- void interrupt_and_wait( system_time const& abs_time);
+ void interrupt_and_wait_until( system_time const& abs_time);
 
                 template< typename DurationType >
- void interrupt_and_wait( DurationType const& rel_time)
+ void interrupt_and_wait_for( DurationType const& rel_time)
                 {
                         unique_lock< mutex > lk( mtx_);
                         interrupt_();
@@ -76,11 +76,11 @@
 
         void interrupt_and_wait();
 
- void interrupt_and_wait( system_time const& abs_time);
+ void interrupt_and_wait_until( system_time const& abs_time);
 
         template< typename DurationType >
- void interrupt_and_wait( DurationType const& rel_time)
- { impl_->interrupt_and_wait( rel_time); }
+ void interrupt_and_wait_for( DurationType const& rel_time)
+ { impl_->interrupt_and_wait_for( rel_time); }
 
         bool interruption_requested();
 

Modified: sandbox/task/boost/task/handle.hpp
==============================================================================
--- sandbox/task/boost/task/handle.hpp (original)
+++ sandbox/task/boost/task/handle.hpp 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -83,12 +83,12 @@
         void interrupt_and_wait()
         { intr_.interrupt_and_wait(); }
 
- void interrupt_and_wait( system_time const& abs_time)
- { intr_.interrupt_and_wait( abs_time); }
+ void interrupt_and_wait_until( system_time const& abs_time)
+ { intr_.interrupt_and_wait_until( abs_time); }
 
         template< typename Duration >
- void interrupt_and_wait( Duration const& rel_time)
- { intr_.interrupt_and_wait( rel_time); }
+ void interrupt_and_wait_for( Duration const& rel_time)
+ { intr_.interrupt_and_wait_for( rel_time); }
 
         bool interruption_requested()
         { return intr_.interruption_requested(); }
@@ -221,12 +221,12 @@
         void wait() const
         { fut_.wait(); }
 
- template< typename Duration >
- bool wait_for( Duration const& rel_time) const
- { return fut_.timed_wait( rel_time); }
+ void interrupt_and_wait_until( system_time const& abs_time)
+ { intr_.interrupt_and_wait_until( abs_time); }
 
- bool wait_until( system_time const& abs_time) const
- { return fut_.timed_wait_until( abs_time); }
+ template< typename Duration >
+ void interrupt_and_wait_for( Duration const& rel_time)
+ { intr_.interrupt_and_wait_for( rel_time); }
 
         void swap( handle< void > & other)
         {

Modified: sandbox/task/libs/task/doc/async_completion_token.qbk
==============================================================================
--- sandbox/task/libs/task/doc/async_completion_token.qbk (original)
+++ sandbox/task/libs/task/doc/async_completion_token.qbk 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -8,6 +8,9 @@
 
 [section:async_completion_token Asynchronous completion token]
 
+The __act__ dispatches processing actions (__tasks__) in response to the completion of asynchronous operations. __act__ uniquely identifies
+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].
+
 [include handle.qbk]
 
 [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-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -26,13 +26,13 @@
 
 [template link_act[link_text] [link boost_task.async_completion_token [link_text]]]
 [template link_ae[link_text] [link boost_task.async_executor [link_text]]]
-[template link_coop_task[link_text] [link boost_task.task.cooperative_task [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_coop_task[link_text] [link boost_task.task.cooperative [link_text]]]
+[template link_channel[link_text] [link boost_task.async_executor.pool.channel [link_text]]]
+[template link_forkjoin[link_text] [link boost_task.async_executor.pool.forkjoin [link_text]]]
 [template link_handle[link_text] [link boost_task.async_completion_token.handle [link_text]]]
-[template link_pool[link_text] [link boost_task.pool [link_text]]]
+[template link_pool[link_text] [link boost_task.async_executor.pool [link_text]]]
 [template link_task[link_text] [link boost_task.task [link_text]]]
-[template link_work_stealing[link_text] [link boost_task.pool.work_stealing [link_text]]]
+[template link_work_stealing[link_text] [link boost_task.async_executor.pool.work_stealing [link_text]]]
 
 [def __thread__ `boost::thread`]
 
@@ -69,9 +69,11 @@
 [def __fn_has_value__ `has_value()`]
 [def __fn_has_exception__ `has_exception()`]
 [def __fn_interrupt__ `interrupt()`]
-[def __fn_interrupt_and_wait__ `interrupt_and_wait()`]
+[def __fn_interrupt_and_wait_for__ `interrupt_and_wait_for()`]
+[def __fn_interrupt_and_wait_until__ `interrupt_and_wait_until()`]
 [def __fn_interruption_requested__ `interruption_requested()`]
 [def __fn_is_ready__ `is_ready()`]
+[def __fn_operator__ `operator()()`]
 [def __fn_wait__ `wait()`]
 [def __fn_wait_for__ `wait_for()`]
 [def __fn_wait_until__ `wait_until()`]

Modified: sandbox/task/libs/task/doc/handle.qbk
==============================================================================
--- sandbox/task/libs/task/doc/handle.qbk (original)
+++ sandbox/task/libs/task/doc/handle.qbk 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -1 +1,33 @@
-
+[/
+ 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:handle Handle]
+
+__handle__ represents a __act__. It is associated by a __task__ (uniquely identified) and is returned by __fn_async__.
+
+[heading:act_interface Asynchronous completion token interface]
+
+__handle__ implements an interface in order to check the state of computation and result transfer
+
+* __fn_get_id__:
+* __fn_is_ready__:
+* __fn_has_value__:
+* __fn_has_exception__:
+* __fn_get__:
+* __fn_wait__:
+* __fn_wait_for__:
+* __fn_wait_until__:
+
+[heading:task_interruption Task interruption]
+
+* __fn_interrupt__:
+* __fn_interupt_and_wait_for__:
+* __fn_interrupt_and_wait_until__:
+* __fn_interruption_requested__:
+
+[endsect]

Modified: sandbox/task/libs/task/doc/overview.qbk
==============================================================================
--- sandbox/task/libs/task/doc/overview.qbk (original)
+++ sandbox/task/libs/task/doc/overview.qbk 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -11,17 +11,17 @@
 __boost_task__ provides an framework for parallel execution of tasks (a task is a small unit of code that can be executed independently).
 
 * __task__, __callable__ representing a fine-grained work-item:
- * get_id() returning an identifier
- * operator() to execute the fine-grained work-item
- * get_future() providing an __act__ in order to pass the result (values, exceptions) back to initiator
+ * __fn_get_id__ returning an identifier
+ * __fn_operator__ to execute the fine-grained work-item
+ * __fn_get_future__ providing an __act__ in order to pass the result (values, exceptions) back to initiator
 
 * __handle__, __act__ of the asynchronously executed task:
- * get_id() for identifying associated __task__
- * interrupt(), interrupt_and_wait() allow to cancel an coop_task_link[cooperative task]
+ * __fn_get_id__ for identifying associated __task__
+ * __fn_interrupt__, interrupt_and_wait() allow to cancel an coop_task_link[cooperative task]
         * interface of __act__:
- * get() retrieve value or exception of task execution
- * is_ready() test if task was executed
- * wait(), wait_for() and wait_until() block until task is executed and the result is set
+ * __fn_get__ retrieve value or exception of task execution
+ * __fn_is_ready__ test if task was executed
+ * __fn_wait__, wait_for() and wait_until() block until task is executed and the result is set
 
 * __async__, executes a task on behalf of __aes__
 

Modified: sandbox/task/libs/task/doc/task.qbk
==============================================================================
--- sandbox/task/libs/task/doc/task.qbk (original)
+++ sandbox/task/libs/task/doc/task.qbk 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -10,11 +10,11 @@
 
 A task is a chunk of code that can be executed independently.
 
-__task__ represents a __callable__ object containing the unit of code to be execute by a link_ae[__ae__]. Function __fn_get_future__ returns a link_act[__act__] allowing to wait for the completion of the computation of the task, for getting the result of a computation or for transfering exceptions.
+__task__ represents a __callable__ (provides __fn_operator__) object containing the unit of code to be execute by a link_ae[__ae__]. Function __fn_get_future__ returns a link_act[__act__] allowing to wait for the completion of the computation of the task, for getting the result of a computation or for transfering exceptions.
 Each __task__ has a unique identifier
 
 
-[heading:create_task Creation]
+[heading:create Creation]
 
 __fn_make_task__ can be used to create __task__ by passing free-functions or member-functions of objects and its arguments: __fn_make_task__ accepts up to ten
 arguments per default (can be overriden by defining BOOST_TASK_MAKE_TASK_MAX_ARITY with the new value).
@@ -51,7 +51,7 @@
     boost::task::task< std::string > t( y);
     
 
-[heading:cooperative_task Cooperative task amd interruption]
+[heading:cooperative Cooperative task amd interruption]
 
 Sometimes it is desired to stop a running task if it is no longer needed. In this case the thread is not killed -
 it stops only at well-defined points (__interruption__points__) its execution.
@@ -107,7 +107,7 @@
         }
 
 
-[heading:task_exceptions Exceptions]
+[heading:exceptions Exceptions]
 
 Exceptions thrown by __task__ are transported by the __act__.
 
@@ -153,7 +153,7 @@
 * `boost::broken_task`
 
 
-[heading:parent_tasks Parent-tasks]
+[heading:parent Parent-tasks]
 
 Top-level tasks have no parent. A parent task can create child tasks when it creates another task by using __as_sub_task__ as __ae__. These children are implicitly treated as __sub_tasks__ of the larger task. It is assumed that that __sub_tasks__ can be executed in any order because only overall operation
 speed matters (enabling strategies for fast execution of unordered work-items as link_work_stealing[__work_stealing__]).

Modified: sandbox/task/libs/task/src/interrupter.cpp
==============================================================================
--- sandbox/task/libs/task/src/interrupter.cpp (original)
+++ sandbox/task/libs/task/src/interrupter.cpp 2009-05-17 03:35:13 EDT (Sun, 17 May 2009)
@@ -79,7 +79,7 @@
 }
 
 void
-interrupter::impl::interrupt_and_wait( system_time const& abs_time)
+interrupter::impl::interrupt_and_wait_until( system_time const& abs_time)
 {
         unique_lock< mutex > lk( mtx_);
         interrupt_();
@@ -115,7 +115,7 @@
 { impl_->interrupt_and_wait(); }
 
 void
-interrupter::interrupt_and_wait( system_time const& abs_time)
+interrupter::interrupt_and_wait_until( system_time const& abs_time)
 { impl_->interrupt_and_wait( abs_time); }
 
 bool


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk