Conversation
|
I've now also tested this on illumos, to test the |
taiki-e
left a comment
There was a problem hiding this comment.
Thanks! This is generally LGTM.
|
For the mentioned problem, I think it would be a better idea to put Alternatively, putting a wrapper type for that into the crate root, and expose appropriate conversions. |
|
I think the generally preferred behavior regarding time overflow is saturation or close to it. |
|
Makes sense; I've now changed the code to handle The i686-unknown-freebsd failure looks real. I'm investigating. |
|
The i686-unknown-freebsd failure is real; I'm working on a fix. |
|
Sorry, I currently don't have time to properly review this (as I'm trying to finish a thesis); maybe after next week. I wish I'd knew how to test this for Hermit, but I currently don't. |
rustix 1.0 introduced a new [`Buffer`] API which is used in `epoll::wait`, `kqueue`, and `polling`, so this patch updates the code to use the new [`spare_capacity`] mechanism for writing to the spare capacity of a `Vec`. rustix 1.0 also changes timeout parameters from `i32` milliseconds to `Timespec` seconds plus nanoseconds, which is more general and aligns with newer Linux syscalls such as [`epoll_pwait2`]. This also fixes a bug in the `wait` function; in rustix 0.38, calling `epoll::wait` would clear the events list before adding new events, however polling's documentation [states] that "New events will be appended to `events`." Using `spare_capacity` in rustix 1.0, the list is not cleared first, so events are appended. [`Buffer`]: https://docs.rs/rustix/latest/rustix/buffer/trait.Buffer.html [`spare_capacity`]: https://docs.rs/rustix/latest/rustix/buffer/fn.spare_capacity.html [`epoll_pwait2`]: https://www.man7.org/linux/man-pages/man2/epoll_pwait2.2.html [states]: https://docs.rs/polling/latest/polling/struct.Poller.html#method.wait
There was a problem hiding this comment.
Manual test suite run passes on x64_64-unknown-freebsd and x86_64-unknown-linux-gnu.
Please write a CHANGELOG.md entry for this, given that it changes how event vectors are handled: they aren't cleared anymore, this is a bugfix that brings the code back in line with what it should be, but that itself doesn't prevent downstream from accidentally ending up relying on the former, buggy behavior. (non-blocker)
|
Published in 3.8.0. |
rustix 1.0 introduced a new
BufferAPI which is used inepoll::wait,kqueue, andpolling, so this patch updates the code to use the newspare_capacitymechanism for writing to the spare capacity of aVec.rustix 1.0 also changes timeout parameters from
i32milliseconds toTimespecseconds plus nanoseconds, which is more general and aligns with newer Linux syscalls such asepoll_pwait2.This also fixes a bug in the
waitfunction; in rustix 0.38, callingepoll::waitwould clear the events list before adding new events, however polling's documentation states that "New events will be appended toevents." Usingspare_capacityin rustix 1.0, the list is not cleared first, so events are appended.Closes #234.