From: Victor Stinner Date: Mon, 26 Jan 2015 10:02:59 +0000 (+0100) Subject: Issue #23293, asyncio: Cleanup IocpProactor.close() X-Git-Tag: v3.4.3rc1~79^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d2256f671b7ed5c769dd34b27ae597cbc69047c;p=python Issue #23293, asyncio: Cleanup IocpProactor.close() The special case for connect_pipe() is not more needed. connect_pipe() doesn't use overlapped operations anymore. --- diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index 42c5f6e1a4..6c7e058042 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -694,12 +694,7 @@ class IocpProactor: def close(self): # Cancel remaining registered operations. for address, (fut, ov, obj, callback) in list(self._cache.items()): - if obj is None: - # 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(): + if fut.cancelled(): # Nothing to do with cancelled futures pass elif isinstance(fut, _WaitCancelFuture):