-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Milestone
Description
For Unix (kqueue and epoll) to drain readiness all you have to do is read/write until you get a "short" read/write, i.e. less bytes are processed than your buffer size. However Mio doesn't guarantee that another event is return until the I/O operations hits a WouldBlock error. This means that to strictly follow Mio's docs you'll have to issue another pointless system call (read/write/etc.).
This is because on Windows Mio could only guarantee the readiness to be drained once a WouldBlock error was returned. However nowadays we control that ourselves in IoSourceState::do_io. So, we could change it to reregister when e.g. the read bytes < buffer size.
Also find out if all of this is true for poll (see #1602).
Noah-Kennedy and sullivan-sean
Metadata
Metadata
Assignees
Labels
No labels