Hacker News new | ask | show | jobs
by shuss 2263 days ago
Nope. io_uring is an API that helps with asynchronous I/O.
1 comments

That's kind of my question. I want async I/O with a device, can io_uring help?
If you have a character/block device that does read/write ops, you'd probably get io_uring support for free.
As neighbour says, io_uring is for really high performance (as in high throughput) stuff, so… not I2C !

But you can still want async I/O with an I2C device, of course, as in you don't want to block a thread to wait on a message. And for that I believe you can still use good old select/epoll as usual on your I2C device file, and as a consequence also just use your favourite async I/O framework of the day (libevent, node.js, what have you).

Does your device have a file descriptor, as is traditional in Unix? Seems like the theoretical answer should then be yes.