Boost logo

Boost :

Subject: [boost] [interthreads] Library under development v0.3
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-19 02:27:46


Hi,

I have add the fork_after function to Boost.InterThreads. The prototype allows to execute asynchronously N functions and execute asynchronously a function that depends on the completion of N functions.

    bith::shared_launcher ae;
    BOOST_AUTO(actT, bith::fork_all(ae, fct1, fct2));
    BOOST_AUTO(act, bith::fork_after(ae, fct3, actT));
    act.wait();

bith::shared_launcher is an asynchronous executor (AE) that executes asynchronously a function on a new thread.

bith::fork_all request the AE to execute asynchronously each function. It returns a fusion tuple of the asynchronous completion token (ACT) associated the the ae.

bith::fork_after request the AE to execute a function asynchronously once each one of ACTs in the dependency tuple parameter are ready. It is similar to the async_with_dependencies proposed Peter Dimov.

I have used for that Boost.Future (Anthony proposal).

I've added also some act traits, as value type, is movable, has_future_if, has_thread_if.

The library is available at
Boost Sandbox: https://svn.boost.org/svn/boost/sandbox/interthreads
and
Boost Vault: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=interthreads.zip&directory=Concurrent%20Programming&
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.

Best regrads,
Vicente

_____________________
Vicente Juan Botet Escribá


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk