Skip to content

Commit

Permalink
Merge pull request #10085 from impact27/fix_traitlets_kernel_died
Browse files Browse the repository at this point in the history
PR: Stop IPython console channels faster

[ci skip]
  • Loading branch information
ccordoba12 authored Aug 27, 2019
2 parents ffeed76 + 70d6cb1 commit 760df48
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions spyder/plugins/ipythonconsole/widgets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@
time.monotonic = time.time


#-----------------------------------------------------------------------------
# Auxiliary functions
#-----------------------------------------------------------------------------
def background(f):
"""
Call a function in a simple thread, to prevent blocking
Taken from the Jupyter Qtconsole project
"""
t = Thread(target=f)
t.start()
return t


#-----------------------------------------------------------------------------
# Client widget
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -503,8 +489,9 @@ def shutdown(self):
now = False
self.shellwidget.spyder_kernel_comm.close()
self.shellwidget.kernel_manager.shutdown_kernel(now=now)
self.shellwidget.pdb_history_file.save_thread.stop()
if self.shellwidget.kernel_client is not None:
self.shellwidget.kernel_client.shutdown()
self.shellwidget.kernel_client.stop_channels()

def interrupt_kernel(self):
"""Interrupt the associanted Spyder kernel if it's running"""
Expand Down

0 comments on commit 760df48

Please sign in to comment.