mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274)
This commit is contained in:
parent
31ec52a9af
commit
67ba547cf0
3 changed files with 24 additions and 76 deletions
|
@ -315,7 +315,12 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
|||
super().run_forever()
|
||||
finally:
|
||||
if self._self_reading_future is not None:
|
||||
ov = self._self_reading_future._ov
|
||||
self._self_reading_future.cancel()
|
||||
# self_reading_future was just cancelled so it will never be signalled
|
||||
# Unregister it otherwise IocpProactor.close will wait for it forever
|
||||
if ov is not None:
|
||||
self._proactor._unregister(ov)
|
||||
self._self_reading_future = None
|
||||
|
||||
async def create_pipe_connection(self, protocol_factory, address):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue