You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For KeyboardInterrupt, there are varied behaviours. Check this issue : python/asyncio#341
It depends on how you trigger KeyboardInterrupt. When there is a callback that doesn't return - you need to use the signal to break through that, eg a loop like
whileTrue:
pass
Adding asyncio.loop.add_signal_handlermight not work because it wouldn't stop such a loop.
Otoh, if there's an event loop or a queue running, and you do not want the signal to interrupt that routine, you can use asyncio.loop.add_signal_handler .
What is wrong?
Currently, trinity is not correctly handling
KeyboardInterrupt
for asyncio loop based processes.How can it be fixed
Fill this in if you know how to fix it.
We need to make use of the
asyncio.loop.add_signal_handler
API to do proper keyboard interrupt signal handling.The text was updated successfully, but these errors were encountered: