Braulio Valdivielso Martínez
Braulio Valdivielso Martínez
I've implemented the functionality (epollerr awaking waiters) for the `AsyncRead` slot as well (also for the `AsyncWrite` one actually, but that one is tricky because `ready.is_error()` implies `ready.is_write_closed()`, which already...
I think I've found a way to test this automatically! By searching `EPOLLERR` on https://github.com/torvalds/linux (who would have guessed this would actually work) I've found https://github.com/torvalds/linux/blob/46f4945e2b39dda4b832909434785483e028419d/fs/eventfd.c#L175-L176 Indeed, the man page...
> So this looks very promising! That was wrong. It's true that if the counter's value is 0xfffffffff then polling on the eventfd will return EPOLLERR, but it's very hard...
I've addressed a few of the `TODO`s that I had left in my changes, but the main problem with this PR remains: automated testing. I have not found any way...
Maybe I can add unit tests in the `schedule_io` module. I know unit tests are generally discouraged in this project but they could be worth it here. I'll have a...
(this is still very much WIP) I think I might be able to unit test part of the changes. I've written one such test in https://github.com/tokio-rs/tokio/pull/4444/files#diff-585bbdb06d4f023035fc2520bc464acb733f7f212921936f13c9873798cbfc92R602 , and will keep...
What should the fix do? Should `async_fd.readable().await` return an error whenever the `EPOLLERR` happens? Or should it return success (and the user will get the error when attempting a read)?...
> If EPOLLERR is returned went something went wrong, so the most logical path would be to return the error to the user. Getting the error can be a bit...
> The current behavior of async_fd.writable().await is to succeed (try the last test in my original post, it unwrap()s without panic). This can be traced down to https://github.com/tokio-rs/mio/blob/dca2134ef355b3c0d00e8e338e44e7d9ed63edac/src/sys/unix/selector/epoll.rs#L180-L187 https://github.com/tokio-rs/mio/blob/05009e4f60335fa00e9ea6a118595548afee0607/src/event/event.rs#L116-L123 An...
> EPOLLERR also triggers is_error. It trigger is_write_closed because of the epoll manual, which states: >> Error condition happened on the associated file descriptor. This event is also reported for...