These are chat archives for ipython/ipython

7th
Feb 2019
Maarten Breddels
@maartenbreddels
Feb 07 14:03
i'm playing with ipython7's async await features in the notebook
when waiting at await <somefuture>, I see no events in the network-websocket going on, so nothing from ipywidgets' front end goes gets processed at the kernel, is that expected behaviour?
Min RK
@minrk
Feb 07 15:14
I think so
message handling order is still preserved
Maarten Breddels
@maartenbreddels
Feb 07 15:19
hmm, too bad
basically, i want behaviour as input(), where processing resumes after a change, but i guess that's not possible using the widgets
Min RK
@minrk
Feb 07 15:21
Not really, at least not right now.
The message protocol mostly prevents that
It's not impossible, but it would be quite challenging to properly preserve message handling while allowing concurrent message processing.
Maarten Breddels
@maartenbreddels
Feb 07 15:24
i assumed the msg loop would be the same as the asyncio loop
thanks @minrk !
Min RK
@minrk
Feb 07 15:30
It is the same as the asyncio loop, but it's a single coroutine in that loop processing messages off the queue.
So message order is explicitly preserved by ipykernel, rather than allowing message requests to trigger while an async handler is waiting.
If ipykernel figured out how to do concurrent message handling (quite tricky with the amount of global state), then we could relax this constraint.