Skip to content

Commit

Permalink
only enter eventloop when there is one
Browse files Browse the repository at this point in the history
rather than calling enter_eventloop again when the eventloop is disabled (eventloop = None)
  • Loading branch information
minrk committed Jan 16, 2018
1 parent dc54a6e commit 1bb6a1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class Kernel(SingletonConfigurable):
def _update_eventloop(self, change):
"""schedule call to eventloop from IOLoop"""
loop = ioloop.IOLoop.current()
loop.add_callback(self.enter_eventloop)
if change.new is not None:
loop.add_callback(self.enter_eventloop)

session = Instance(Session, allow_none=True)
profile_dir = Instance('IPython.core.profiledir.ProfileDir', allow_none=True)
Expand Down

0 comments on commit 1bb6a1f

Please sign in to comment.