Issue
Installing jupyter_collaboration results in not being able to kill JupyterLab from the terminal.
Reproduce
- Install
jupyterlab and jupyter_collaboration
- Create a Notebook, so that you create at least one room
- Try to kill jupyterlab with
Ctrl + C in the terminal
Attempts to fix the issue
After some investigation, it looks like this sys.exit call does not work as expected even though it properly raises a SystemExit.
One reason for sys.exit to not work can be a hanging thread or subprocess that has not been terminated.
My investigations so far have been:
- Removed the
_confirm_exit thread from jupyter_server to see if that thread did not prevent from finishing
- Refactored the tasks cleanup in ypy-websockets and jupyter_collaboration
- Remove any
AnyIO usage in ypy-websockets. I tried this because there seems to be an "AnyIO worker thread" thread hanging around upon termination.
None of these attempts fixed the issue. Though I think the refactor of the tasks cleanup could be good to include anyway.
Issue
Installing
jupyter_collaborationresults in not being able to kill JupyterLab from the terminal.Reproduce
jupyterlabandjupyter_collaborationCtrl + Cin the terminalAttempts to fix the issue
After some investigation, it looks like this
sys.exitcall does not work as expected even though it properly raises aSystemExit.One reason for
sys.exitto not work can be a hanging thread or subprocess that has not been terminated.My investigations so far have been:
_confirm_exitthread from jupyter_server to see if that thread did not prevent from finishingAnyIOusage in ypy-websockets. I tried this because there seems to be an "AnyIO worker thread" thread hanging around upon termination.None of these attempts fixed the issue. Though I think the refactor of the tasks cleanup could be good to include anyway.