diff --git a/IPython/kernel/manager.py b/IPython/kernel/manager.py index 24d8dfd..7c5f38d 100644 --- a/IPython/kernel/manager.py +++ b/IPython/kernel/manager.py @@ -259,15 +259,15 @@ class KernelManager(LoggingConfigurable, ConnectionFileMixin): msg = self.session.msg("shutdown_request", content=content) self.session.send(self._control_socket, msg) - def wait_shutdown(self, totaltime=1, interval=0.1): + def finish_shutdown(self, waittime=1, pollinterval=0.1): """Wait for kernel shutdown, then kill process if it doesn't shutdown. This does not send shutdown requests - use :meth:`request_shutdown` first. """ - for i in range(int(totaltime/interval)): + for i in range(int(waittime/pollinterval)): if self.is_alive(): - time.sleep(interval) + time.sleep(pollinterval) else: break else: @@ -311,7 +311,7 @@ class KernelManager(LoggingConfigurable, ConnectionFileMixin): # Don't send any additional kernel kill messages immediately, to give # the kernel a chance to properly execute shutdown actions. Wait for at # most 1s, checking every 0.1s. - self.wait_shutdown() + self.finish_shutdown() self.cleanup(connection_file=not restart) diff --git a/IPython/kernel/multikernelmanager.py b/IPython/kernel/multikernelmanager.py index fec79df..8c46197 100644 --- a/IPython/kernel/multikernelmanager.py +++ b/IPython/kernel/multikernelmanager.py @@ -138,7 +138,7 @@ class MultiKernelManager(LoggingConfigurable): """Ask a kernel to shut down by its kernel uuid""" @kernel_method - def wait_shutdown(self, kernel_id, totaltime=1, interval=0.1): + def finish_shutdown(self, kernel_id, waittime=1, pollinterval=0.1): """Wait for a kernel to finish shutting down, and kill it if it doesn't """ self.log.info("Kernel shutdown: %s" % kernel_id) @@ -163,7 +163,7 @@ class MultiKernelManager(LoggingConfigurable): for kid in kids: self.request_shutdown(kid) for kid in kids: - self.wait_shutdown(kid) + self.finish_shutdown(kid) self.cleanup(kid) @kernel_method