Boost logo

Boost :

Subject: Re: [boost] boost::async documentation
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-11-29 09:14:17


Le 29/11/14 13:04, Aaron Levy a écrit :
> I did not see any explicit documentation of the boost::async template although I see some mention of it since Boost 1.53. Is there some cohesive documentation which lists:
>
> 1. The macros needed to enable the functionality if any.
> 2. Details of behavior and limitations.
> 3. Differences in behavior wrt std::async.
>
>
>
http://www.boost.org/doc/libs/1_57_0/doc/html/thread/synchronization.html#thread.synchronization.futures
http://www.boost.org/doc/libs/1_57_0/doc/html/thread/synchronization.html#thread.synchronization.futures.reference.async

The behavior depends on the following expression

#if ! defined(BOOST_NO_SFINAE_EXPR) && \
     ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
     ! defined(BOOST_NO_CXX11_DECLTYPE) && \
     ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \
     ! defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && \
     ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
     ! defined(BOOST_NO_CXX11_HDR_TUPLE)

In this case the interface and behavior follows the C++11 std::async.

Otherwise, the interface has a lot of limitations (no variadics, no
deferred policy) and the resulting future doesn't block. IMO, it is
unusable in this context.

Please, be free to create any ticket that could help to improve the library.

HTH,
Vicente


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