OK, I cooked something up: http://codereview.appspot.com/71180043
On Mon, Mar 3, 2014 at 4:48 PM, Victor Stinner <[email protected]>wrote: > 2014-03-03 23:50 GMT+01:00 Guido van Rossum <[email protected]>: > > or I can fix asyncio so that it will silently ignore the > > remove_reader() calls (and remove_writer() too, of course). > > remove_reader/writer() should do nothing (just return False) if the > event loop was closed (if self._selector is None). It's not very > useful to get an exception here, you can check the result (False) if > you are concerned by such "bug" in your application. > > add_reader/writer() should raise if the event loop was closed. It's > already the case currently: an attribute error is raised. In the > future, we may raise ValueError as the io module does for closed > files. > > Victor > -- --Guido van Rossum (python.org/~guido)
