Kurt Pagani wrote:
> 
> Am 11.10.2016 um 04:39 schrieb Waldek Hebisch:
> > 
> > I am affraid there are dragons here.  IIUC you use FriCAS functions
> > in two different threads.  Currently FriCAS is not thread safe
> > and doing this may lead to troubles.  More precisely, for
> > performance FriCAS depends on various global caches.  Updating
> > them simultanously from independent threads may lead to corruption.
> > This is worst kind of bugs...
> > 
> 
> At first I also was afraid of what you described above. And yet I couldn't 
> avoid
> doing some extensive tests. Apparently the webserver does not interfere in any
> way with Fricas (thanks to the bordeaux-threads I suppose).  I fired over 1000
> queries (automated). Surprisingly enough it also works when starting the 
> server
> in a interpreter window (-iw) and one can even interact with the current 
> session
> although |parseAndEvalToString| is used only (it beats me how this is 
> possible).
> 

Well, I hope that threads work correctly.  Given that independent
threads should execute fine.  The problem is with simultanous
computations in main FriCAS thread and access to FriCAS functions
from the webserver.

I wrote that releated bugs are nasty.  Main thing is that there
are timing dependencies.  It may work fine on your machine and
fail on slightly different machine.  Frequently probability
of hitting bug is quite low.  You may be tempted to declare
that code is good enough -- if there is a bug but nobody
notices does it matter?  The trouble is that a priori you do
not know if and when bug will bite -- the amount of testing
needed to get any confidence is prohibitive.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to