Skip to content

Commit 5ea4033

Browse files
authored
Clarify what a restart means (#966)
* Clarify what a restart means * Review feedback * Fix review comments
1 parent 3b7d073 commit 5ea4033

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/messaging.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,15 @@ multiple cases:
10491049
IPythonQt client) to force a kernel restart to get a clean kernel without
10501050
losing client-side state like history or inlined figures.
10511051

1052+
Implementation recommendation for starting kernels: A restart should optimally
1053+
preserve as many resources outside the kernel as possible (e.g. only restart the
1054+
kernel and its subprocesses and not any parent processes). That is, ideally a
1055+
restart should be "in-place". For local kernels, there is typically no parent
1056+
process so a "hard" restart and an in-place restart are identical whereas for
1057+
remote kernels this is not generally the same. As an example, if a remote kernel
1058+
is run in a container, during an in-place restart the container may be kept
1059+
running and a new kernel process within it would be started.
1060+
10521061
The client sends a shutdown request to the kernel, and once it receives the
10531062
reply message (which is otherwise empty), it can assume that the kernel has
10541063
completed shutdown safely. The request is sent on the ``control`` channel.

0 commit comments

Comments
 (0)