mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
Issue #23293, asyncio: Cleanup IocpProactor.close()
The special case for connect_pipe() is not more needed. connect_pipe() doesn't use overlapped operations anymore.
This commit is contained in:
parent
2596dd0894
commit
3d2256f671
1 changed files with 1 additions and 6 deletions
|
@ -694,12 +694,7 @@ class IocpProactor:
|
||||||
def close(self):
|
def close(self):
|
||||||
# Cancel remaining registered operations.
|
# Cancel remaining registered operations.
|
||||||
for address, (fut, ov, obj, callback) in list(self._cache.items()):
|
for address, (fut, ov, obj, callback) in list(self._cache.items()):
|
||||||
if obj is None:
|
if fut.cancelled():
|
||||||
# The operation was started with connect_pipe() which
|
|
||||||
# queues a task to Windows' thread pool. This cannot
|
|
||||||
# be cancelled, so just forget it.
|
|
||||||
del self._cache[address]
|
|
||||||
elif fut.cancelled():
|
|
||||||
# Nothing to do with cancelled futures
|
# Nothing to do with cancelled futures
|
||||||
pass
|
pass
|
||||||
elif isinstance(fut, _WaitCancelFuture):
|
elif isinstance(fut, _WaitCancelFuture):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue