jupyter / jupyter_client

Jupyter protocol client APIs
https://jupyter-client.readthedocs.io
BSD 3-Clause "New" or "Revised" License
383 stars 283 forks source link

`get_msgs` hangs due to lack of timeout #1029

Open BrenBarn opened 2 months ago

BrenBarn commented 2 months ago

The documentation for the get_msgs method of a channel says that it gets all messages that are currently ready. But actually it hangs (at least with a blocking client) because it calls get_msg with no timeout, which means the call to get_msg just blocks with no messages available. Before v7.0, a timeout of zero was passed.

I think just adding a timeout=0 argument here would fix it, but I haven't followed the refactorings that took place over the last few versions so I'm not sure.

I came across this because I was trying to revisit this issue to see if it was actually fixed in 8.x. It seems the issue may have been present for some time. Maybe I'm the only one still trying to use the sync/blocking interface. . . :-)