Boost logo

Boost :

From: Klemens Morgenstern (klemensdavidmorgenstern_at_[hidden])
Date: 2023-08-14 23:20:32


On Mon, Aug 14, 2023 at 11:04 PM Christian Mazakas via Boost
<boost_at_[hidden]> wrote:
>
> > It's open to any awaitable, i.e. a user can just co_await whatever he wants.
> > asio prevents this by design because it has way less it can assume
> > about the environment.
> > That is, asio::awaitable cannot await anything other than itself and
> > an async op, not even asio::experimental::coro.
>
> Where is this shown in the docs?
>
> I'd like to see a fully working example of a custom awaitable and
> I didn't see it in the docs on a cursory glance.
>

There is no example in the docs, because this is part of the language.
I.e. `co_await std::suspend_never()` is a valid statement in most
coroutines.

It's in the python example:
https://github.com/klemens-morgenstern/async/blob/master/example/python.cpp#L234

> > I don't see the asio coroutines as competition, they just solve a
> > different use-case.
>
> In general, I'm not sure I see much compelling difference between this
> library and whatever Asio provides.

How much experience with "whatever asio provides" do you have?

>
> - Christian
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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