From octave-graphics-request at bevo dot che dot wisc dot edu Mon Sep 17 09:54:48 2001 Subject: Re: new version of TK octave From: Paul Kienzle To: =?iso-8859-1?Q?Jo=E3o?= Cardoso CC: Paul Kienzle , octave-graphics@bevo.che.wisc.edu Date: Mon, 17 Sep 2001 10:51:40 -0400 Octave is certainly NOT thread safe. You need to link it against pthreads so that the threadsafe routines in glibc are picked up correctly. If not, then the connection to X fails unexpectedly. This is also true for Rafael Laboissiere's gtk widgets, though the symptoms are a little different. See http://www.octave.org/mailing-lists/octave-graphics/2000/29 The thread-based implementation of tk_octave still has concurrency issues. Particularly, access to octave variables is unprotected. The easiest solution is to block all access to octave variables while the interpreter is running, but I haven't done this yet. At present users and GUI coders have to be careful. I've tried to generate an error by changing a value in the interpreter while it is being accessed by the GUI but I wasn't able to. Note that Rafael's gtk widgets process GUI callbacks in octave even when octave is running something else! I wasn't able to generate an error there either, but I didn't try very hard. Paul Kienzle pkienzle at users dot sf dot net Joćo Cardoso wrote: > In > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/octave/tk_octave/readme.txt?rev=1.1&content-type=text/vnd.viewcvs-markup > > You say: > > Compiling Octave with tk_interp.cc > ================================== > > In order to use tk_interp, we needed to relink the Octave binary with > pthreads. > > And Octave is already thread safe? > > Joao