Torsten Landschoff added the comment:

If anybody cares, here is a small patch to implement this. I ran the test suite 
and nothing else fails because of this change.

However I wonder if this is a slippery slope to go: If call_soon raises after 
the event loop is closed than everything else that registers an action with the 
loop should raise as well.

So for consistency this patch should grow quite a bit (unless 
create_connection, add_reader etc. already raise in this case).

If the decision is to go this path I would also suggest to add a new exception 
type for "Event loop is closed" so that it can be caught in client code.

YMMV

----------
keywords: +patch
nosy: +torsten
Added file: http://bugs.python.org/file37298/call_soon_after_close.diff

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

Reply via email to