Skip to content

Commit dc8461c

Browse files
authored
Revert "Fix stop_on_error_timeout blocking other messages in queue"
1 parent 2585955 commit dc8461c

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

ipykernel/kernelbase.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
CONTROL_PRIORITY = 1
4242
SHELL_PRIORITY = 10
43+
ABORT_PRIORITY = 20
4344

4445

4546
class Kernel(SingletonConfigurable):
@@ -791,11 +792,16 @@ def _abort_queues(self):
791792
stream.flush()
792793
self._aborting = True
793794

794-
def stop_aborting(f):
795-
self.log.info("Finishing abort")
796-
self._aborting = False
795+
self.schedule_dispatch(
796+
ABORT_PRIORITY,
797+
self._dispatch_abort,
798+
)
797799

798-
self.io_loop.add_future(gen.sleep(self.stop_on_error_timeout), stop_aborting)
800+
@gen.coroutine
801+
def _dispatch_abort(self):
802+
self.log.info("Finishing abort")
803+
yield gen.sleep(self.stop_on_error_timeout)
804+
self._aborting = False
799805

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

0 commit comments

Comments
 (0)