This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Using Guile with threads
Keith Wright <kwright@tiac.net> writes:
> > From: Mikael Djurfeldt <mdj@mdj.nada.kth.se>
> >
> > "Frederic Brunel" <brunel@mail.dotcom.fr> writes:
> >
> > > For informations, I'm using Linux with Posix Threads.
> >
> > As soon as you link the application with libpthread, it is no longer
> > possible to create Guile threads. This is because Linux pthreads use
> > the base of the stack to store internal information. Since Guile
> > threads have their own stacks, anything may happen.
>
> Since it doesn't work, is it possible to make it break in
> a more obvious way than "anything may happen". Say by
> ensuring there are definitions for the same symbol that will
> make the loader complain if you try to use them both at once?
It may be possible. If it is, it's a good idea to do so.
But it might be difficult since there are other pthreads
implementations which do work, so we would need to select a Linux
pthreads-specific symbol.
I've started working on a third alternative: To let Guile use pthread
primitives for allocating the COOP-thread stacks. Don't know when I
have time to complete it, though.