Boost logo

Boost :

Subject: Re: [boost] Boost candidate similar to asyncplusplus
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2014-01-26 20:16:29


> I was wondering if there is anything similar to asyncplusplus [1] here in
> Boost land.
>
> I just found out about the library and I specially liked the task chaining
> syntax [2]:
>
> ---
> async::spawn([] {
> return 42;
> }).then([](int result) {
> return result;
> }).then([](task<int> parent) {
> std::cout << parent.get() << std::endl; });
> ---
>
> This is something I would love to see in Boost.
>
> So I ask:
>
> 1) Are there any similar Boost candidates for task scheduling?
> 2) If not, is ASIO up to this with some adaptation?
>
> I felt specially inclined to ask this here because of all the discussion
> taking place over the recently reviewed Fibers library and the
> fundamentals of asynchronous processing. Very interesting thoughts being
> discussed there. And something more higher level (but not necessarily IO
> bound) might be helpful.

Not in Boost, but heavily based on Boost and aligned with it in terms of
coding and general style: https://github.com/STEllAR-GROUP/hpx/. The library
exposes an interface aligned with the C++11 Standard on top of a (highly
efficient) fiber-like threading system:

future<void> f = async([]{
    return 42;
}).then([](future<int> result) {
    return result;
}).then([](future<int> parent) {
    cout << parent.get() << endl;
});

Many of the proposed extensions to std::future are supported as well
(when_all/when_any, etc.).

Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu


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