Hi Bruce,

On 26 April 2017 at 21:30, Bruce Sherwood <[email protected]> wrote:

> So my ill-formed question is this: Can someone summarize the Jupyter
> communications machinery in the context of my difficulty in doing something
> similar? For example, in the notebook case I don't see any difference in
> the behavior of user-driven function behavior and event-driven function
> behavior.


The kernel (the part where the user's code runs) runs an event loop. This
handles both the user sending code to be executed, and other events such as
widget callbacks. However, it doesn't use separate threads for this, so if
the user executes a cell containing 'time.sleep(10)', the event loop can't
handle anything else until it's finished.

I assume you want it to handle events while the user's code is still
running? I think the only options for that are to use some kind of async
framework (which may require user's code to be aware of it - i.e. no
calling time.sleep()), or to use threads.

Thomas

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qgNajW1QLVtaj-wp%2B-r49ZcDs8M%3D-YQWCnAcabb7p060A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to