Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
digitalsignalperson opened this issue Apr 8, 2023 · 0 comments

Comments

@digitalsignalperson
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant