[docs] [issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum
report at bugs.python.org
Tue Dec 3 20:51:46 CET 2013
Guido van Rossum added the comment:
I think you're looking for the discussion in issue 19017.
IIRC the conclusion is that not only do you not get the same error everywhere, but you get it at different points -- sometimes register() of a bad FD passes and then [Selector.]select() fails, other times register() of a bad FD fails; when the FD is initially good and then gets closed, sometimes select() may fail, sometimes select() will silently ignore the FD. Sometimes unregister() of a closed FD will return False, sometimes True.
Another consequence is that registering an FD, then closing it, then calling select(), then reopening it may keep reporting events for the FD or not.
I think these are all things to call out in a section on caveats or common bugs.
Python tracker <report at bugs.python.org>
More information about the docs