Skip to content

Commit 4f7c825

Browse files
committed
Clarify the status message.
1. Make the ‘starting’ status optional, since receiving it is unreliable anyway due to race conditions with connecting to the kernel. 2. Clarify that the kernel may send other status states that could be ignored 3. Take out the notebook-specific states, since that should be in notebook documentation, not in kernel messaging docs.
1 parent 9dabc43 commit 4f7c825

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

docs/messaging.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,8 @@ Message type: ``error``::
12051205

12061206
``pyerr`` renamed to ``error``
12071207

1208+
.. _status:
1209+
12081210
Kernel status
12091211
-------------
12101212

@@ -1215,8 +1217,7 @@ Message type: ``status``::
12151217
content = {
12161218
# When the kernel starts to handle a message, it will enter the 'busy'
12171219
# state and when it finishes, it will enter the 'idle' state.
1218-
# The kernel will publish state 'starting' exactly once at process startup.
1219-
execution_state : ('busy', 'idle', 'starting')
1220+
execution_state : ('busy', 'idle', other optional states)
12201221
}
12211222

12221223
When a kernel receives a request and begins processing it,
@@ -1227,6 +1228,10 @@ it shall publish a status message with ``execution_state: 'idle'``.
12271228
Thus, the outputs associated with a given execution shall generally arrive
12281229
between the busy and idle status messages associated with a given request.
12291230

1231+
A kernel may send optional status messages with execution states other than
1232+
`busy` or `idle`. For example, a kernel may send a status message with a
1233+
`starting` execution state exactly once at process startup.
1234+
12301235
.. note::
12311236

12321237
**A caveat for asynchronous output**
@@ -1243,14 +1248,6 @@ between the busy and idle status messages associated with a given request.
12431248
Busy and idle messages should be sent before/after handling every request,
12441249
not just execution.
12451250

1246-
.. note::
1247-
1248-
Extra status messages are added between the notebook webserver and websocket clients
1249-
that are not sent by the kernel. These are:
1250-
1251-
- restarting (kernel has died, but will be automatically restarted)
1252-
- dead (kernel has died, restarting has failed)
1253-
12541251
Clear output
12551252
------------
12561253

0 commit comments

Comments
 (0)