Skip to content

Commit

Permalink
Clarify what a restart means (#966)
Browse files Browse the repository at this point in the history
* Clarify what a restart means

* Review feedback

* Fix review comments
  • Loading branch information
mlucool authored Dec 6, 2023
1 parent 3b7d073 commit 5ea4033
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/messaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,15 @@ multiple cases:
IPythonQt client) to force a kernel restart to get a clean kernel without
losing client-side state like history or inlined figures.

Implementation recommendation for starting kernels: A restart should optimally
preserve as many resources outside the kernel as possible (e.g. only restart the
kernel and its subprocesses and not any parent processes). That is, ideally a
restart should be "in-place". For local kernels, there is typically no parent
process so a "hard" restart and an in-place restart are identical whereas for
remote kernels this is not generally the same. As an example, if a remote kernel
is run in a container, during an in-place restart the container may be kept
running and a new kernel process within it would be started.

The client sends a shutdown request to the kernel, and once it receives the
reply message (which is otherwise empty), it can assume that the kernel has
completed shutdown safely. The request is sent on the ``control`` channel.
Expand Down

0 comments on commit 5ea4033

Please sign in to comment.