Boost logo

Boost :

Subject: Re: [boost] Asynchronous library now in Boost Library Incubator
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2016-11-30 11:31:17


Hi Henry,

On 11/27/2016 11:21 AM, Christophe Henry wrote:
> Dear Community,
>
> The Asynchronous library is now listed in the Boost Library Incubator (
> http://blincubator.com/bi_library/asynchronous-2/?gform_post_id=1654).
> I took a lot of time since first presenting it in C++ Now 2014 in order to
> extend the scope and intensively test the library.
> The library has been in use in production code for already 1.5 years, has
> survived billions of calls and usage 24/7, so its core is stable and quite
> tested. All algorithms have not been used though so that bugs are possible
> there.
> The reason for using the Incubator is, the library is quite big and 2 weeks
> review will not be sufficient so I hope for comments, discussions or
> pre-reviews earlier on.

After having a deeper dive into the documentation and examples, one
pattern I see popping up quite
frequently is this:
future<R> fut = my_promise.get_future();
post_callback(some_work, [this](expected<R> r) {
this->my_promise.set_value(r.get()); });
return fut;

Is there any performance/usability drawback from this (might have gotten
the syntax wrong here):
return post_future(pool, some_work);

Why is the former to be preferred to the latter, or vice versa?

Regarding the documentation overall, it seems to miss a proper reference
section. For example, boost::asynchronous::expected is used almost
everywhere, but not documented.

>
> Asynchronous is first of all an architecture tool. It allows organizing a
> complete application into Thread Worlds, each world having the possibility
> to use the same or different threadpools for long-lasting tasks. The
> library provides an implementation of the Active Object pattern, extended
> to allow many Active Objects to live in the same World. It provides several
> Threadpools and many parallel algorithms making use of them. And most
> important of all, it allows simple, blocking-free asynchronous programming
> based on thread-safe callbacks.
> It also provides very useful logging and HTML diagnostics (see
> https://htmlpreview.github.io/?https://raw.githubusercontent.com/henry-ch/asynchronous/master/libs/asynchronous/doc/examples/final.html)
> to allow better understanding of code.
>
> I look forward to an interesting and lively discussion.
>
> Christophe
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
Thomas Heller
Friedrich-Alexander-Universität Erlangen-Nürnberg
Department Informatik - Lehrstuhl Rechnerarchitektur
Martensstr. 3
91058 Erlangen
Tel.: 09131/85-27018
Fax:  09131/85-27912
Email: thomas.heller_at_[hidden]

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