Skip to content

"nudge" the kernel, i.e. send requests until the SUB socket is connected and able to receive the "idle" status message  #1

Open

Description

@digitalsignalperson

from jupyter/jupyter_client#941 (comment)

The SUB socket of the client can take time to connect to the IOPUB channel, and the client can miss important messages (especially those with the kernel status). The current workaround implemented in different clients is to "nudge" the kernel, i.e. send requests until the SUB socket is connected and able to receive the "idle" status message (i.e. having km.iopub_channel.msg_ready() returning True). You can find more detail in this issue.

and I think there's some other good examples that could be adopted from https://github.com/jupyter/jupyter_client/pull/592/files

e.g. this pattern

try:
    await self.iopub_channel.get_msg(timeout=0.2)
except Empty:
    pass

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions