Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upApplication hanging after KeyboardInterrupt #335
Comments
|
I believe that the exception handler for an asyncio event loop should be a normal function, not a coroutine function. The documentation says it's just a callable. |
|
Tried running your snippet, and I got many strange behaviors, such as haning or infinite loop of exception handlers, etc., even after changing the exception handler to just print messages as a non-coroutine function. |
|
If you want to keep using |
PYTHONASYNCIODEBUGin env?: Yesuvloop, I get a runtime warning and the application hangs until I run akill -9on the process id.Snippet:
issue.pyRun the file:
python issue.pyThen hit Ctrl+c on keyboard, output:
Which hangs until running
kill -9 <pid>If you comment out
uvloop.install()and follow the same steps, the program terminates as expected. Output: