On Friday, April 28, 2017 at 12:34:56 AM UTC+12, takowl wrote:
>
> 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.
>

Have you looked at asyncio in Python 3.5 
<https://docs.python.org/3/library/asyncio.html>? That would allow the user 
to execute coroutines that do things like

    await asyncio.sleep(«interval»)

without holding up the event loop. 

-- 
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/8a0a9e18-e1cb-4815-9ae8-aaf95d40dec8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to