As part of the Rust bindings for Libnbd, I try to integrate the asynchronous (aio_*) functions with Tokio, the most used asynchronous runtime in Rust. However, in its eventloop, Tokio uses epoll(7) instead of poll(2) (which is used internally in Libnbd). The difference is that poll(2) uses level-triggered notifications as aposed to epoll(7) which uses edge-triggered notifications.
- After calling aio_get_direction(3), can I know that reading/writing would actually block?
- After calling for example aio_notify_read(3), can I know that the next reading from the file descriptor would block?