This is the mail archive of the guile@sourceware.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: Using Guile with threads


First of all, I'm trying to use Guile in a small C++
3D engine. All I want is to launch a console 
(like the scrip-fu console of Gimp) in a thread and
an OpenGL session in another.
The two threads must have access to Guile. The 
console thread will evaluate scheme code to build 
new objects and put them in the 3D world (in real-time) 
and the other thread is the world main loop, its
job is to update all 3D objects by calling scheme
code to control them.

All I do is to start Guile as usual, I launch the
console and a new thread with the world main loop!
I've tried to synchronize the two threads with 
mutexes to avoid conflict while accessing the Guile 
eval function but it doesn't seems to be sufficient.

For most funny thing with this problem is that I've
also tried SIOD and both were stuck in the same GC 
function: the mark_locations (x, n)... The stack 
is corrupted and n is above 2e6!

For informations, I'm using Linux with Posix Threads.
I could post the init code if it can help.

----------------------------------------------------
Frederic BRUNEL            Phone: (+33)0 556 123 750
Game/App Developer                      UIN: 2189048
brunel@mail.dotcom.fr    http://www.chez.com/brunel/
----------------------------------------------------

----------------------------------------------------
Frederic BRUNEL            Phone: (+33)0 556 123 750
Game/App Developer                      UIN: 2189048
brunel@mail.dotcom.fr    http://www.chez.com/brunel/
----------------------------------------------------
----- Original Message ----- 
From: Mark Galassi <rosalia@lanl.gov>
To: Frederic Brunel <frederic.brunel@free.fr>
Cc: <guile@sourceware.cygnus.com>
Sent: samedi 23 octobre 1999 21:31
Subject: Re: Using Guile with threads


> 
>     Frederic> I've tried to use Guile in a separated threads in my
>     Frederic> application and it doesn't seems to work...  Guile
>     Frederic> report me an Stack Overflow ERROR!
> 
> How did you use guile in multiple threads?
> 
> Guile takes control of your main program, and you can only invoke it
> once, so I presume you are not invoking it once/thread, right?
> 
> Can you give us more detail?  A minimal program that shows the
> problem?  An operating system version and which tread implementation
> you are using?
> 


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