[Scilab-Dev] Commit 23351 about the Tcl event loop
Bruno JOFRET
bruno.jofret at inria.fr
Fri Mar 7 17:30:51 CET 2008
fvogelnew1 at free.fr wrote:
> Hi,
>
> I have noticed commit 23351 from Bruno Jofret, and I see three points to raise
> about it.
>
>
> 1. This commit:
>
> http://viewvc.scilab.org/bin/cgi/viewvc.cgi/trunk/scilab/modules/core/src/c/syncexec.c?limit_changes=0&r1=23350&r2=23351
>
> has changed a fix that Serge has made for bugs 2455 and 2384.
>
> a. Did you check that those bugs do not show up again?
>
I did not have any knowledge about those fixes (even after 45 min speak
with Serge), so thanks for the tip.
It seems ok for me. Can you check it back ?
> b. What is the reason for overriding what parse has set in the interruptible
> flag?
>
The reason is after having an error in syncexec, the storecommand is put
in uninterruptible mode.
So all the callbacks we were storing after that were looping endlessly.
You can reproduce that behaviour with those steps :
- open scipad
- type "error(10)"
all seems allright...
- close scipad
- do 1+2 in the console, you lost scilab.
He is looping on an empty command that can not end because it's
un-interruptible.
Weird..
>
> 2. In the same commit, we can now read this:
>
> http://viewvc.scilab.org/bin/cgi/viewvc.cgi/trunk/scilab/modules/scipad/tcl/scilabexec.tcl?limit_changes=0&r1=23350&r2=23351
>
> # Bruno : Communication between Scipad and Scilab through
> # TCL global interp is not a clever idea...
>
> I will check this in depth, but I think I remember it didn't work correctly when
> the scipad Tcl interpreter was used, that's why I had to use the global Tcl
> interp.
>
> Anyway, Bruno Jofret, could you please elaborate on why you say it's not clever?
>
I am a bit busy for now, I promiss to write some documentation about the
new Tcl behaviour.
To put it shortly, we have now a separated thread for Tcl stuff.
And those commands were making reentrant call so that we stay in a
deadlock process.
I guess it is the same issue with debug mode.
>
> 3. Still in scilabexec.tcl:
>
> ScilabEval_lt "flush"
>
> must be useless since all the previous ScilabEvals use "sync" "seq".
>
> If your changes do no longer work when you remove the flush, then it means that
> the sync option of ScilabEval does not work.
>
>
Oups... My mistake...
It was only a debug/investigation purpose.
It works fine for me without this. Is it ok for you too ?
Bruno.
--
Bruno JOFRET
Project Engineer
___SCILAB - INRIA Rocquencourt___
Domaine de Voluceau - B.P. 105
78153 Le Chesnay Cedex
Tel : (+33/0)1.39.63.58.63
Mailto : bruno.jofret at inria.fr
http://www.scilab.org
More information about the dev
mailing list