Refactor _doReadOrWrite implementations to remove duplication
[email protected] Mon, 08 Mar 2010 01:36:46 -0000
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from exarkun <[email protected]>: `twisted/internet/pollreactor.py`, `twisted/internet/epollreactor.py`, and `twisted/internet/gtk2reactor.py` all contain `_doReadOrWrite` implementations which bear a striking resemblance to each other. It would be nice if these poll-like reactors could all share one implementation of this logic. One thing to note is that `gtk2reactor` behaves subtly differently from the others with respect to half-close. If a selectable is both readable and writeable simultaneously, `pollreactor` and `epollreactor` will treat write errors as completely closing the connection. `gtk2reactor`, on the other hand, appears as though it will treat this case as a half-close. The latter behavior seems wrong and should probably be eliminated by the refactoring. Adding a test for it might also be nice. ---------- Type : task Component: core Keywords : Priority : normal Nosy : ---------- http://twistedmatrix.com/trac/ticket/4357