mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Issue #23140, asyncio: Fix cancellation of Process.wait(). Check the state of
the waiter future before setting its result.
This commit is contained in:
parent
8c1a4a2326
commit
c447ba04e7
2 changed files with 30 additions and 1 deletions
|
@ -96,7 +96,8 @@ class SubprocessStreamProtocol(streams.FlowControlMixin,
|
|||
returncode = self._transport.get_returncode()
|
||||
while self._waiters:
|
||||
waiter = self._waiters.popleft()
|
||||
waiter.set_result(returncode)
|
||||
if not waiter.cancelled():
|
||||
waiter.set_result(returncode)
|
||||
|
||||
|
||||
class Process:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue