[Ecls-list] Embedding ECL inside a containing C++ program.
Juan Jose Garcia-Ripoll
jlr at mpq.mpg.de
Tue Aug 27 06:47:09 UTC 2002
On Tuesday 27 August 2002 05:21, you wrote:
> --- Juan Jose Garcia-Ripoll <jlr at mpq.mpg.de> wrote: >
>
> On Sunday 25 August 2002 17:56, Andrew Topp wrote:
> > I do not like this fix. The bug that you have
> > discovered proves that the way
> > it is implemented (with function pointers) makes the
> > use of CLOS streams
> > essentially not reentrant.
Just a comment about my own comment. When I mean not reentrant I mean that
the READ/WRITE code might end up calling your code, which in turn calls
READ/WRITE operations. The use of global variables to save the state of the
lisp reader/printer is a bad practice which is spread all over ECL. I am
working on removing these hacks -- they are clever optimizations, but they
spare so few cycles and cause such a maintainance headache...
More on this on the announcement following this message.
> It was just a quick fix on my half.. but I've noticed
> something else that is commented as not being
> thread-safe, the cfun NValues global used to count
> return values.
NValues and many other things are thread-specific variables. When switching
from thread to thread, these values have to be updated. Same happens with the
stack in which the definiton of global variables is stored. Therefore, lisp
threads have to be (currently) handled by lisp. The problem is that I never
find enough time to work rewriting the lwp.d stuff to work again with all the
improvements which were made in the rest of the library.
Juanjo
--
Max-Planck-Institut fuer Quantenoptik +49/089/32905-127
Hans-Kopfermann-Str. 1, D-85748 www.arrakis.es/~worm
Garching b. Muenchen, Germany worm at arrakis.es
More information about the ecl-devel
mailing list