ipywidgets: is there a potential race condition tween java-script and a python thread?

25 views
Skip to first unread message

nlecle...@gmail.com

unread,
Dec 23, 2016, 6:23:00 AM12/23/16
to Project Jupyter
Hi all,

I'm currently evaluating a Jupyter based solution for our data acquisition and visualization platform.
Concerning the acquisition part, the idea is to monitor the scan progression and provide some feedback to the user updating some (ipy)widgets - such as progress bar, text-area, ... The widgets update is done from a dedicated python thread - i.e. one thread per widgets layout. 

My question is: is there a potential race condition or any kind of potential thread-safety problem between the front-end (brower/js) and the back-end (python thread). 

I observe a lot of Firefox (ESR 45.6.0) crashes and I'm wondering if there is a link with what I'm doing (1). 

Thanks.
Nicolas.

(1) BTW, I already had some crashes before implementing the asynchronous activity of my app.




Thomas Kluyver

unread,
Dec 23, 2016, 2:13:59 PM12/23/16
to Project Jupyter
On 23 December 2016 at 11:23, <nlecle...@gmail.com> wrote:
My question is: is there a potential race condition or any kind of potential thread-safety problem between the front-end (brower/js) and the back-end (python thread). 

There's plenty of potential for race conditions, it's up to the code you write to avoid them.


> I observe a lot of Firefox (ESR 45.6.0) crashes and I'm wondering if there is a link with what I'm doing (1).

It shouldn't be possible to crash the browser with race conditions between JS & the Python code in the kernel. In fact, it shouldn't be possible to crash the browser with JS at all (except maybe by overloading it). Anything is possible, though.
Reply all
Reply to author
Forward
0 new messages