diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-12-04 22:07:47 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-12-04 22:07:47 (GMT) |
commit | e80bf0d4a996b3ecda2c2f3cbab10037b9fdcd5e (patch) | |
tree | 44657f6e8bee097da3fa5c79db0092a0df6858a4 /Lib/asyncio/unix_events.py | |
parent | dd8224e6a483a45d7cf2e7be0fa7d818a3f04c80 (diff) | |
download | cpython-e80bf0d4a996b3ecda2c2f3cbab10037b9fdcd5e.zip cpython-e80bf0d4a996b3ecda2c2f3cbab10037b9fdcd5e.tar.gz cpython-e80bf0d4a996b3ecda2c2f3cbab10037b9fdcd5e.tar.bz2 |
Closes #22922: More EventLoop methods fail if the loop is closed. Initial patch
written by Torsten Landschoff.
create_task(), call_at(), call_soon(), call_soon_threadsafe() and
run_in_executor() now raise an error if the event loop is closed.
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r-- | Lib/asyncio/unix_events.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index efe06d4..d5db4d5 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -71,6 +71,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): or coroutines.iscoroutinefunction(callback)): raise TypeError("coroutines cannot be used with add_signal_handler()") self._check_signal(sig) + self._check_closed() try: # set_wakeup_fd() raises ValueError if this is not the # main thread. By calling it early we ensure that an |