guile-user
[Top][All Lists]
Advanced

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

Re: threads in 1.7.1


From: Marius Vollmer
Subject: Re: threads in 1.7.1
Date: Mon, 18 Oct 2004 17:43:21 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Julian Graham <address@hidden> writes:

> 1. Is it now possible to have more than one thread of C code make
> calls to Guile functions?

Yes.  Guile now aims to be thread-safe for real concurrent threads.
There might be bugs that make it unsafe, of course, but we hope that
we can fix most of them for the 1.8 release.

However, right now it is the case (I think), that only threads created
by Guile can call into Guile.  We want to fix that as well.

One restriction that will very likely remain is that a thread that
wants to use Guile must not block without Guile knowing about it.
Threads will be able to leave 'Guile mode' and can then block in any
way they want, however.

> 2. To what extent are Guile's Scheme threads now compatible with POSIX
> threads?

They are one and the same, although threads that want to use Guile
must still cooperate a bit, as outlined above.

>  If I can somehow call pthread_cancel on a Scheme thread
> created via scm_thread_spawn, etc., will it bring disaster upon my
> program (or Guile)?

I don't know off-hand, but ideally you should be able to call
pthread_cancel for a Guile-using thread.

> 3. Regardless of the answer to 2., are there any plans to implement
> some kind of thread cancellation interface in Guile's Scheme API? 

I don't know of any concrete plans, but thread cancellation is
certainly part of a complete thread API, so we should have it.




reply via email to

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