##// END OF EJS Templates
enable graceful restart of kernels in notebook
MinRK -
Show More
@@ -43,7 +43,7 b' class MultiKernelManager(LoggingConfigurable):'
43 43 """A class for managing multiple kernels."""
44 44
45 45 kernel_manager_class = DottedObjectName(
46 "IPython.zmq.kernelmanager.KernelManager", config=True,
46 "IPython.zmq.blockingkernelmanager.BlockingKernelManager", config=True,
47 47 help="""The kernel manager class. This is configurable to allow
48 48 subclassing of the KernelManager for customized behavior.
49 49 """
@@ -87,6 +87,8 b' class MultiKernelManager(LoggingConfigurable):'
87 87 config=self.config,
88 88 )
89 89 km.start_kernel(**kwargs)
90 # start the shell channel, needed for graceful restart
91 km.start_channels(shell=True, sub=False, stdin=False, hb=False)
90 92 self._kernels[kernel_id] = km
91 93 return kernel_id
92 94
@@ -284,7 +286,7 b' class MappingKernelManager(MultiKernelManager):'
284 286 """Restart a kernel while keeping clients connected."""
285 287 self._check_kernel_id(kernel_id)
286 288 km = self.get_kernel(kernel_id)
287 km.restart_kernel(now=True)
289 km.restart_kernel()
288 290 self.log.info("Kernel restarted: %s" % kernel_id)
289 291 return kernel_id
290 292
General Comments 0
You need to be logged in to leave comments. Login now