Boost logo

Boost :

Subject: [boost] [interthreads] Library under development v0.2
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-14 13:49:51


I have added the threader/joiner classes following the design of Kevlin Henney N1833 - Preliminary Threading Library Proposal for TR2 (http:/
I use the Boost.Futures library from Anthony (review ongoing)

In addition and as a generalization of these classes I have started a framework working with asynchronous executors -AE (threader) and asynchronous completion tokens -ACT (joiner).

The library include also an launcher (AE) associated to the unique_future (ACT) which is the equivalent of the thread_pool in N2276 - Thread Pools and Futures (

With some minor changes in the ThreadPool library (review scheduled), the tp:pool can be seen as a AE and the tp::task as a ACT.

The library allows also to fork several functions at the same time. The result of the fork_all operation is a fusion tuple of asynchronous completion token handles. The user can apply any fusion algorithm on this tuple as for example. To make common tasks easier the library provide some functors and some functions that are the result of applying these functors to the tuple using a fusion algorithm.

Last the library provides also some functions like wait_for_all that forks all the functions and wait for the result of all of them and wait_for_any which works with functions that return the same type, and forks all the functions and wait for the first one.

For the moment the AE/ACT framework is included it in Bosst.InterThreads library, but this is independent and can be included in an independent library (any suggestion for a name and a namespace?)

The library is available at
Boost Sandbox:
Boost Vault:
Includes every thing on the Sandbox + Html documentation + Boost.Futures + Boost.ThreadPool adaptations

I'd appreciate it if people could take a look, test it on their compiler and give me some feedback.
It's not quite ready for formal review yet.

Best regrads,

Vicente Juan Botet Escribá

Boost list run by bdawes at, gregod at, cpdaniel at, john at