diff options
| author | jhaydaman <33549221+jhaydaman@users.noreply.github.com> | 2018-05-30 07:15:06 (GMT) |
|---|---|---|
| committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2018-05-30 07:15:06 (GMT) |
| commit | 0a28c0d12ee7201de039ced4d815f57f1f8fd48c (patch) | |
| tree | 9fa72f88b1f3035ea9fe5a4bde10215a432abe30 /Lib/concurrent/futures/__init__.py | |
| parent | bb9474f1fb2fc7c7ed9f826b78262d6a12b5f9e8 (diff) | |
| download | cpython-0a28c0d12ee7201de039ced4d815f57f1f8fd48c.zip cpython-0a28c0d12ee7201de039ced4d815f57f1f8fd48c.tar.gz cpython-0a28c0d12ee7201de039ced4d815f57f1f8fd48c.tar.bz2 | |
bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)
Future.set_result and Future.set_exception now raise InvalidStateError
if the futures are not pending or running. This mirrors the behavior
of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future
when set_result is called multiple times.
Diffstat (limited to 'Lib/concurrent/futures/__init__.py')
| -rw-r--r-- | Lib/concurrent/futures/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/concurrent/futures/__init__.py b/Lib/concurrent/futures/__init__.py index 8434fcf..d746aea 100644 --- a/Lib/concurrent/futures/__init__.py +++ b/Lib/concurrent/futures/__init__.py @@ -10,6 +10,7 @@ from concurrent.futures._base import (FIRST_COMPLETED, ALL_COMPLETED, CancelledError, TimeoutError, + InvalidStateError, BrokenExecutor, Future, Executor, |
