Message232301
Currently, this is what I do in the child after the fork:
>>> selector = loop._selector
>>> parent_class = selector.__class__.__bases__[0]
>>> selector.unregister = lambda fd: parent_class.unregister(selector, fd)
It replaces unregister() by _BaseSelectorImpl.unregister(), so "our" data structures are still cleaned (the dict _fd_to_key, for instance).
If a fix for this issue is desired in tulip, the first solution proposed by Guido (closing the selector and let the unregister call fail, see the -trivial- patch attached) is probably good enough. |
|
Date |
User |
Action |
Args |
2014-12-08 11:20:24 | martius | set | recipients:
+ martius, gvanrossum, vstinner, yselivanov |
2014-12-08 11:20:24 | martius | set | messageid: <1418037624.89.0.273221676807.issue21998@psf.upfronthosting.co.za> |
2014-12-08 11:20:24 | martius | link | issue21998 messages |
2014-12-08 11:20:24 | martius | create | |
|