23 Jun
2026
23 Jun
'26
5:17 p.m.
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.
Thanks. I thought io_context::run() used the calling thread to run the scheduler. If I have the time, I'll try to experiment with this before the review ends. Best, Ruben.