-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite exception loop in asyncio coroutine mode on exit() or quit() #541
Comments
Did some digging. In the repl.py function Lines 156 to 176 in 91d2c35
This swallows the exception and causes the calling code in The sync version, however, re-raises a SystemExit: Lines 96 to 115 in 91d2c35
Is there any reason for the async version to not also do the same? |
If you run the async example from here: https:/prompt-toolkit/ptpython/blob/master/examples/asyncio-python-embed.py
and execute a
exit()
orquit()
statement, the prompt goes into an infinite loop of errors that look like this:I have to Ctrl-Z to pause the process or kill it from another window, since Ctrl-C is not effective at this point.
The thread ID in the exception message increases, so I gather it's continuously spawning threads which each crash since stdin has been closed by
exit()
This is on Ubuntu linux 20.04 with Python 3.9
The text was updated successfully, but these errors were encountered: