David Brochart
David Brochart
> * Run 'asyncio-for-sync' in a dedicated IO thread. `call_soon_threadsafe` and `concurrent.futures.Future` make this pretty doable, and in my experience simpler and more robust than using nest_asyncio. ipyparallel's sync client...
Nice! It looks like it's creating a new thread for each coroutine though. It would be nice to reuse threads from a pool, for performance reasons. (Maybe you had that...
Ah my bad :+1:
See https://github.com/jupyter/jupyter_client/runs/1667921500 I agree this shouldn't be fixed here.
I didn't look at https://github.com/jupyter/jupyter_console/issues/251 yet, but I remember I opened https://github.com/jupyter/jupyter_console/pull/244.
`get_shell_msg()` accepts a timeout argument (or no argument if you want it to block until you get a message).
No, you get the `execute_reply` message, which is what you requested.
Outputs are published on the `iopub` channel, so you could execute: ```python client.get_iopub_msg() ``` several times until you get something like: ``` {'header': {'msg_id': 'fe6d2697-235a3266a0761becb4c122af_821765_6', 'msg_type': 'execute_result', 'username': 'david', 'session':...
BTW, if you are interested in the kernel protocol, a great way to learn how it works (besides [the documentation](https://jupyter-client.readthedocs.io/en/stable/messaging.html)) is to use [jupyterlab-kernelspy](https://github.com/jupyterlab-contrib/jupyterlab-kernelspy).
Some more information would be useful, ideally a minimum reproducible example.