|
Boost : |
From: Christian Mazakas (christian.mazakas_at_[hidden])
Date: 2023-07-26 15:25:24
> I know you want to use io_uring and you seem to think you can't.
> What's the issue with creating your own awaitables that use io_uring
> and co_await them from async's coroutines?
Actually, this would be a great test.
I tried reading the docs but I'm not sure how to actually author this.
So, Async runs in its own event loop. In this case, I want a separate
thread with its own io_uring event loop. Something simple that
basically just calls:
while(true) { io_uring_wait_cqe( ... );
Unfortunately, this means I now _have_ to introduce thread synchronization
latency when I'd like to use my own event loop here.
Aside from that, I can write an awaitable that communicates with the
io_uring context
in the awaitable's `await_suspend` but I'm not sure how to get Async
to know when
to resume the awaiting coroutine. What would I wind up doing here?
On my end, a completion queue event (CQE) comes in, I recognize it's
associated with
Async and now I want to tell Async to resume the awaiting coroutine,
i.e. call `.resume()`
on the associated `coroutine_handle`.
- Christian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk