[cpp-threads] Boost.Async: Asynchronous Executor/Asynchronous Completion Token framework

vicente.botet vicente.botet at wanadoo.fr
Tue Jun 2 07:25:30 BST 2009


Hello,

Oliver talk me of this ML yesterday. On Jannuary 2009 I proposed to Boost an Asynchronous Executor/Asynchronous Completion Token framework included in Boost.Interthreads. This framework is included now on Boost.Async (https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Async). I expect this ML is the adequated context to talk about its interface and design.

Boost.Async allows the calling of functions and functors in an asynchronous manner, thereby making it easier to improve the level of concurrency and parallelism in your applications. It provides: 
  a.. An asynchronous execution framework working with AsynchronousExecutor and AsynchronousCompletionToken. It includes some generic functions and several AsynchronousExecutor and AsynchronousCompletionToken: 
    a.. fork and fork_all to execute asynchronously functions 
    b.. fork_after: request an AsynchronousExecutor to execute a function asynchronously once each one of AsynchronousCompletionToken in the dependency tuple parameter are ready. It is similar to the async_with_dependencies proposed Peter Dimov. 
    c.. generic get, join, ... free functions to synchronize on an AsynchronousCompletionToken 
    d.. generic get_all, join_all, ... free functions to synchronize on multiple AsynchronousCompletionToken 
    e.. generic wait_for_all, wait_for_any to execute asynchronously functions and wait for the completion of all or any of them. 
  b.. Some AsynchronousExecutor and AsynchronousCompletionToken models 
    a.. immediate executors: executes synchronously a function on the current thread. Often used for test purposes 
    b.. basic_threader: can be seen as a thread factory executing asynchronously a function on the returned thread. 
    c.. launchers: Lanchers can be seen as a future factory executing asynchronously a function on a hidden thread. 
    d.. threader/joiner: A Threader runs a unary function in its own thread. A Threader can be seen as a Joiner factory executing asynchronously a function on a thread encapsulated on the returned Joiner. The joiner is used to synchronize with and pick up the result from a function or to manage the encapsulated thread. 
    e.. tp::pool and tp::task customization as an AsynchronousExecutor and an AsynchronousCompletionToken respectively. tp::pool can be seen as a tp::task factory executing asynchronously a function on a pool of threads. 
    f.. a generic asynchronous_executor_decorator which allows to decorate the function to be evaluated asynchronously. 
I can rename the main function fork to async if this is clearer.

I'd appreciate it if people could take a look and give me some feedback. 

_____________________
Vicente Juan Botet Escribá
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.decadentplace.org.uk/pipermail/cpp-threads/attachments/20090602/5f25bf09/attachment-0001.htm>


More information about the cpp-threads mailing list