Skip to content

Commit

Permalink
Merge pull request #570 from ipython/revert-539-master
Browse files Browse the repository at this point in the history
Revert "Fix stop_on_error_timeout blocking other messages in queue"
  • Loading branch information
blink1073 authored Dec 11, 2020
2 parents 2585955 + dc8461c commit 7ea4239
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

CONTROL_PRIORITY = 1
SHELL_PRIORITY = 10
ABORT_PRIORITY = 20


class Kernel(SingletonConfigurable):
Expand Down Expand Up @@ -791,11 +792,16 @@ def _abort_queues(self):
stream.flush()
self._aborting = True

def stop_aborting(f):
self.log.info("Finishing abort")
self._aborting = False
self.schedule_dispatch(
ABORT_PRIORITY,
self._dispatch_abort,
)

self.io_loop.add_future(gen.sleep(self.stop_on_error_timeout), stop_aborting)
@gen.coroutine
def _dispatch_abort(self):
self.log.info("Finishing abort")
yield gen.sleep(self.stop_on_error_timeout)
self._aborting = False

def _send_abort_reply(self, stream, msg, idents):
"""Send a reply to an aborted request"""
Expand Down

0 comments on commit 7ea4239

Please sign in to comment.