Re: coroutine condition_variable

Richard Hodges via Boost-users <[email protected]> Wed, 6 Dec 2023 16:19:49 +0100
Newsgroups gmane.comp.lib.boost.user
Message-ID <CALvx3hat2-tbwz9E+_nqRpq53revs_oFQ+sT+p6H5tNDR6a8Qg@mail.gmail.com>
Anyway... you could create a `boost::asio::experimental::basic_channel`
> using the signature `(void)` and then `co_await` the channel to suspend the
> coroutine. Later when you want to wake it up, send a message to the channel
> from elsewhere. You will need to be thoughtful about the order of how
> things are destroyed if you want to tear down the socket (or corresponding
> I/O object). More here:
>
>
> https://www.boost.org/doc/libs/1_83_0/doc/html/boost_asio/reference/experimental__basic_channel.html
>
>
This is actually Chris' recommended solution. It's so new I forgot about
it. :)




> Thanks
>
>
> _______________________________________________
> Boost-users mailing list
> [email protected]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users