Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for file IO? #171

Open
yuzhichang opened this issue Sep 27, 2023 · 2 comments
Open

Support for file IO? #171

yuzhichang opened this issue Sep 27, 2023 · 2 comments

Comments

@yuzhichang
Copy link

asio supports io_uring.
It's great if libcoro support async file IO (io_uring on Linux, IOCP on Windows etc.), so that read/write yield thread to another coroutine.

@jbaldwin
Copy link
Owner

I'm not that familiar with io_uring yet, it seems quite promising but this is definitely a larger task to either:
(a) replace epoll with io_uring -- this solution would mandate a minimum kernel version probably
(b) support both epoll and io_uring - I'm not particularly interested in this approach, I'd rather keep the code simple, I imagine there would be subtle bugs between the two kernel apis and would require a lot of testing and effort to maintain both

@jbaldwin
Copy link
Owner

Another option might be to have a background thread pool which blocks on the file io requests while maintaining epoll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants