Re: [Capy review] Some questions
Klemens Morgenstern via Boost <[email protected]> Wed, 24 Jun 2026 01:14:36 +0800
| Newsgroups | gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <CAGT5OKPQuhz+yR8C8gfJGWC9cxb51b3kJGTo5rGovyx8XATWJQ@mail.gmail.com> |
On Wed, Jun 24, 2026 at 12:40 AM Ruben Perez <[email protected]> wrote: > > I am not sure what `compute()` is in this example, but generally yes. > > I completely messed the line up, sorry. It should have read > > asio::awaitable<void> co_main() > { > auto exec = capy::wrap_asio_executor(co_await > asio::this_coro::executor); > co_await capy::asio_spawn(exec, my_capy_task()); > } > > Out of curiosity, how does the out-of-the-box Corosio integration > work? I mean, the example uses asio::io_context::run(). How does this > get to service Corosio's reactor? > You create a service through the asio executor that contains a capy::execution_context - and vice versa. When the corosio::socket then gets the scheduler from this context, the scheduler *should* create a thread for the reactor. Then, the completion would do a dispatch back onto the asio executor. The above isn't clearly defined in capy yet, which is another reason it's not merged at this point. _______________________________________________ Boost mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.boost.org/mailman3/lists/boost.lists.boost.org/ Archived at: https://lists.boost.org/archives/list/[email protected]/message/JCP36ERSWKYQE6MPG4KEZ3SW27WHFFWB/