We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2585955 commit dc8461cCopy full SHA for dc8461c
1 file changed
ipykernel/kernelbase.py
@@ -40,6 +40,7 @@
40
41
CONTROL_PRIORITY = 1
42
SHELL_PRIORITY = 10
43
+ABORT_PRIORITY = 20
44
45
46
class Kernel(SingletonConfigurable):
@@ -791,11 +792,16 @@ def _abort_queues(self):
791
792
stream.flush()
793
self._aborting = True
794
- def stop_aborting(f):
795
- self.log.info("Finishing abort")
796
- self._aborting = False
+ self.schedule_dispatch(
+ ABORT_PRIORITY,
797
+ self._dispatch_abort,
798
+ )
799
- 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
805
806
def _send_abort_reply(self, stream, msg, idents):
807
"""Send a reply to an aborted request"""
0 commit comments