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: c++ -> guile threading


Peter Amstutz <tetron@student.umass.edu> writes:

> >From what I've been able to gather, if I recompile guile with
> --enable-threads, then I can use QuickThreads in guile.  Does this mean I
> can start quickthread threads in C++ and guile will reconignize them as
> such?

No, but there is a C call scm_spawn_thread which you can use to create
new COOP threads in Guile from the C level.  I'm myself using it in a
C++ program.

There is no direct support in Guile which can be used to solve the
problem how to keep these threads under control.

One idea that turns up in my mind is to use some kind of watchdog
timer: Every thread needs to do some idle calls (or calls to indicate
that everything is OK) intermittently.  If it doesn't, another,
special, thread will kill it.

(One problem is that there is currently no primitive to kill a thread
from outside, but such a primitive will come in 1.3.2.)

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