mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)
This commit is contained in:
parent
f9b364fe51
commit
fdccfe09f0
3 changed files with 22 additions and 0 deletions
|
@ -353,6 +353,9 @@ def _chain_future(source, destination):
|
|||
source_loop.call_soon_threadsafe(source.cancel)
|
||||
|
||||
def _call_set_state(source):
|
||||
if (destination.cancelled() and
|
||||
dest_loop is not None and dest_loop.is_closed()):
|
||||
return
|
||||
if dest_loop is None or dest_loop is source_loop:
|
||||
_set_state(destination, source)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue