Dear list.

I've written an IPython cell magic which runs some computation in a
background thread (via concurrent.futures.ThreadPoolExecutor) and
asynchronously updates a code output cell (via
IPython.display.DisplayHandle.update() called with the help of
add_done_callback()) when it's done.

This works nicely in JupyterLab (and in the Classic Notebook), but
when I run the notebook with nbconvert's --execute flag, the final
outputs don't have their updated values.

Can I do something in the implementation of my cell magic to wait for
all asynchronous updates at the end of the notebook?

Is there some hook function for this?

Or can I somehow check (from within the magic code) if nbconvert (or
another non-interactive tool) is running?
I could easily switch to synchronous processing in that case.

Or is there another way to solve this (that keeps the async behavior
in the interactive case)?

cheers,
Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAFesC-c1COCAckDGpsCROhvQNei2JVe-qqSKQvRgac092hbHmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to