This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Can the Guile library be reentrant




> 	Too bad ... even for very simple functionalities ? For
> instance, I'm trying to integrate Guile in a multi-threaded program
> to provide functions that I want the user to customize instead of
> hard-coding them. After parsing a (guile) configuration file, I get
> several SCM objects which are very simple functions, like (lambda
> (x) (+ 2.0 x)). Then, several threads might call their own function
> at any time. Won't this work either ?

At the moment, I'm afraid not.  Guile wants to know about each stack.

> 	I tried it yesterday, and I got very quickly a guile stack
> overflow. Is this problem related to the former one ? The point is that my
> functions are very simple, but might be called very often (like 30 times per
> second).

I think this is a symptom of the same problem.  Guile notices that the
stack pointer isn't where it expects to find it, and declares a stack
overflow.  Mikael can correct me if I'm wrong.