Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed as duplicate of#77373
Closed as duplicate of#77373
Description
Bug report
Run the snippet below andCtrl+C,
observeinterrupted
will only be printed after ten seconds.
Comment outset_event_loop_policy
and repeat,
observeinterrupted
is printed immediately.
importasyncioimportsysifsys.platform=='win32':asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())asyncdefsleep():print('sleeping')awaitasyncio.sleep(10)print('done')try:asyncio.run(sleep())exceptKeyboardInterrupt:print('interrupted')
For context: I needWindowsSelectorEventLoopPolicy
to mitigatethis error withpyzmq
:
RuntimeError: Proactor event loop does not implement add_reader family of methods required for zmq. zmq will work with proactor if tornado >= 6.1 can be found. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` or install 'tornado>=6.1' to avoid this error.
Your environment
- CPython versions tested on: 3.9.10
- Operating system and architecture: Windows 10, 64-bit
Metadata
Metadata
Assignees
Projects
Status
Done