Charles-François Natali added the comment:

> Interesting issue.  ISTM that closing the FD before unregistering it is a 
> programmer's mistake that shouldn't pass silently.  And closing it in a 
> separate thread while the selector is active sounds like an even bigger bug.

Agreed.

> Could we report an new event type for this situation?  E.g. EVENT_CLOSED.  
> The proper response would be to unregister the FD.  (And yes, unregistering 
> the FD when it was previously registered should not be an error, even if it 
> has been closed.)

The problem is that for epoll (and kqueue I think) the FD is
automagically removed from the backend, which means that we won't get
any notification for this FD, hence we're unable to report it as
closed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19017>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to