##// END OF EJS Templates
Shut down kernels in parallel...
Shut down kernels in parallel When stopping the notebook server, it currently sends a shutdown request to each kernel and then waits for the process to finish. This can be slow if you have several kernels running. This makes it issues all the shutdown requests before waiting on the processes, so shutdown happens in parallel. KernelManager (and MultiKernelManager) gain three new public API methods to allow this: * request_shutdown (promoted from a private method) * wait_shutdown (refactored out of shutdown_kernel) * cleanup (refactored out of shutdown_kernel)

File last commit:

r12374:d33c0b60
r16510:633371e5
Show More
test_public_api.py
41 lines | 1.1 KiB | text/x-python | PythonLexer
MinRK
define and test IPython.kernel public API
r9376 """Test the IPython.kernel public API
Authors
-------
* MinRK
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.kernel import launcher, connect
from IPython import kernel
#-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------
def test_kms():
MinRK
update IPython.kernel.tests to new API
r10290 for base in ("", "Multi"):
MinRK
define and test IPython.kernel public API
r9376 KM = base + "KernelManager"
Thomas Kluyver
Remove uses of @parametric decorator
r12374 nt.assert_in(KM, dir(kernel))
MinRK
define and test IPython.kernel public API
r9376
MinRK
update IPython.kernel.tests to new API
r10290 def test_kcs():
for base in ("", "Blocking"):
KM = base + "KernelClient"
Thomas Kluyver
Remove uses of @parametric decorator
r12374 nt.assert_in(KM, dir(kernel))
MinRK
update IPython.kernel.tests to new API
r10290
MinRK
define and test IPython.kernel public API
r9376 def test_launcher():
for name in launcher.__all__:
Thomas Kluyver
Remove uses of @parametric decorator
r12374 nt.assert_in(name, dir(kernel))
MinRK
define and test IPython.kernel public API
r9376
def test_connect():
for name in connect.__all__:
Thomas Kluyver
Remove uses of @parametric decorator
r12374 nt.assert_in(name, dir(kernel))
MinRK
define and test IPython.kernel public API
r9376