You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm filing this issue to make more concrete the concern that I raised here, and because #360 proposes to commit to the "drop implies deregister" semantics:
When a value is dropped, it will no longer trigger any further notifications.
On Linux, if I run the above program in one terminal and do nc 127.0.0.1 2653 in a second terminal, when I enter data into the second terminal, the program outputs "token 2: readable", even though the specific stream that was registered with the EventLoop has been closed. See Q6 in http://man7.org/linux/man-pages/man7/epoll.7.html for an explanation of why this happens.
When I do the same thing on OSX, token 2 does not receive any notifications.
In my opinion, the kqueue semantics make more sense, but I'm not sure how they could be emulated with epoll. Maybe we just say that registering dup()ed streams leads to undefined behavior? That seems sad, because it's sometimes useful to dup() a stream and register one clone of it as readable and the other clone as writable.
The text was updated successfully, but these errors were encountered:
I'm filing this issue to make more concrete the concern that I raised here, and because #360 proposes to commit to the "drop implies deregister" semantics:
Consider this program:
On Linux, if I run the above program in one terminal and do
nc 127.0.0.1 2653
in a second terminal, when I enter data into the second terminal, the program outputs "token 2: readable", even though the specific stream that was registered with theEventLoop
has been closed. See Q6 in http://man7.org/linux/man-pages/man7/epoll.7.html for an explanation of why this happens.When I do the same thing on OSX, token 2 does not receive any notifications.
In my opinion, the kqueue semantics make more sense, but I'm not sure how they could be emulated with epoll. Maybe we just say that registering
dup()
ed streams leads to undefined behavior? That seems sad, because it's sometimes useful todup()
a stream and register one clone of it as readable and the other clone as writable.The text was updated successfully, but these errors were encountered: