-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Stop IPython console channels faster #10085
PR: Stop IPython console channels faster #10085
Conversation
@@ -504,7 +504,7 @@ def shutdown(self): | |||
self.shellwidget.spyder_kernel_comm.close() | |||
self.shellwidget.kernel_manager.shutdown_kernel(now=now) | |||
if self.shellwidget.kernel_client is not None: | |||
self.shellwidget.kernel_client.shutdown() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between shutdown
and stop_channels
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please remove the background function defined on the top of this file because it's not used anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shutdown
stops the kernel, but is already called in self.shellwidget.kernel_manager.shutdown_kernel(now=now)
. stop_channels
stops the channels, including the heartbeat channel. If the heartbeat channel is not stopped but the kernel is down, the channel will notice and send WARNING:traitlets:kernel died: 18.0
There was still a problem where spyder would hang if closing while closing a console. It is solved here: jupyter/jupyter_client#470. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @impact27 for all your efforts to improve this!
Description of Changes
This avoids messages of the type
WARNING:traitlets:kernel died: 18.0
that are created by #10066. I forgot that I already solved this problem in jupyter/jupyter_client#420, so I added a dependency on jupyter_client 5.2.5+.Issue(s) Resolved
Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: