On Wed, Jun 24, 2026 at 12:40 AM Ruben Perez <rubenperez038@gmail.com> 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.