-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readable includes hup, but writable doesn't #274
Comments
My own personal understanding of the I'm unaware of how hup signals might affect write readiness. (or more notably the |
The issue I have is that you almost never only want to be awoken only on a read signal or a write signal-- in every case I can imagine, you'd always want to be awoken if the thing you were waiting to read from or write to has closed so that you can perform some garbage collection, issue an error, etc. |
Is there a situation where something blocks today when it should wake up? If so that's probably just a bug that needs to be fixed? |
Well, in order for Fuchsia to get notifications of closed signals I've had this section patched in our tree for a while to return |
Hm ok so today the only reason read/write are asymmetric are so that you can |
Sorry, I don't follow why |
Er sorry I think this is all being read into a little too much. We have a |
Right, I'm asking why a |
This may be a case where it's good to play around? You can try removing |
I've spent quite a while looking at this code and trying to understand it, but I'm failing.
poll_read
checks the bits included inread_ready
, which includeshup
.poll_write
, however, doesn't includehup
-- it just checks the writable signal. Why is this? IMO it's weird thatpoll_read
isready
onhup
, but I understand the idea is to push users to attempt a read and then read the remaining data before discovering that the FD is closed. Additionally, since mio makes no guarantees about sending incorrect signals, you can't guarantee that seeing ahup
means that the FD is closed. However, I'd expect the same things to apply to writing (not just reading). What was the logic here?The text was updated successfully, but these errors were encountered: