Boost logo

Boost :

Subject: Re: [boost] [asio] RFC on new reliable UDP library
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2014-09-10 14:09:22


Le 10/09/14 17:20, Niall Douglas a écrit :
> On 9 Sep 2014 at 15:03, Rodrigo Madera wrote:
>
>> About the language, I would totally look forward into C++11 and up design.
> Be aware that C++ 11, and especially C++ 17 as it currently is
> thought to become, consider future-promise as the sole way for i/o
> completion handlers to be invoked via the new
> future<T>.then(callable) function. In particular, 17's resumable
> function support *requires* that the function must return a future,
> so if you want language based coroutine support, you must use
> future<T>.
Niall, C++17 is not done. There is a paper generalizing resumable
functions, so that they can return other types than future<T>. This is
very interesting, as it could be used also for expected<T,E>. The
promise/future you are working on could be used also :)
>
> As much as Chris and many ASIO users are opposed to that design
> choice, we must play with the hand we have been dealt by WG21. I will
> say that future-promise can be made constexpr and no-alloc, and that
> makes an awful lot of the inefficiency go away, though an implicit
> synchronisation is unavoidable as .then() must check if the operation
> has already completed.
Again nothing is fixed. Things evolve, and we don't know yet what the
next concurrency TS will contain.

The question is different if you want to make a proposal for the
standard. Proposing a library for Boost don't need to follow whatever
design would be defined supported in C++17. Boost is here to experiment
also.

Best,
Vicente


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