[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile thread safety.

From: Martin Grabmueller
Subject: Re: Guile thread safety.
Date: Mon, 08 Oct 2001 11:53:51 +0200

> From: Kai-Peter G Backman <address@hidden>
> Date: Sat, 6 Oct 2001 15:29:04 +0300 (EEST)
>  I have an application where guile acts both as a high-level scripting
> language and part of the actual simulation. I have several (>3) threads
> running and some of them are crossing the C/Guile boundary quite often.
> Co-op threads are out of question because of the realtime behaviour of the
> application.

If your application is supposed to be realtime, please note that Guile
makes no guarantees about response time.  A simple call to any gh_ or
scm_ function can take arbitrarily long, given that the garbage
collector is invoked.

>  My current solution uses a singular scheme evaluation thread that
> receives scheme evaluation requests (or functions that use the gh_ or scm_
> interface). I am using 1.4
>  The ideal solution would be one where all threads could use gh_ and scm_
> interfaces and I could handle application level concurrency when needed.
> The next best solution would have calls like "guile_threads_enter" and
> "guile_threads_leave" to guard access to the scheme environment.
>  Will my ideal solution be realised in 1.6? If not, how do I create that
> next best solution?

Preemptive threading is on Guile's todo list, but I suspect it will be
available soon.  Currently, no one is actively working on it, IIRC.
Some time ago, there was even some discussion whether to support it at
all or better restrict Guile to cooperative threading.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]