guile-devel
[Top][All Lists]
Advanced

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

Re: Thread support plan with initial patch


From: Mikael Djurfeldt
Subject: Re: Thread support plan with initial patch
Date: 02 Apr 2001 18:54:12 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

NIIBE Yutaka <address@hidden> writes:

> We could take two different approaches in low-level implementation.
> 
>   (1) Fully asynchronous implementation
>       Any potions of the code may be interrupted.
> 
>   (2) Synchronous implementation
>       Basically, the code is not interrupted.
>       Only when programmers explicitly call the signal cacthing
>       routine, the execution will be interrupted.

As Dirk said, he has worked on a thread implementation.  We should
continue on that implementation, but you are of course very welcome to
join in that development.

The most important idea in that implementation is to remove
conditional compilation of the Guile library, so that the choice
whether or not to use threads and which thread library to use is up to
the user, and not an issue for the system administrator who installs
libguile.  This is achieved through the use of a thread interface,
akin to the thread interface of glib.  Any library providing threads
for libguile can "plug in" into this interface.

The current aim is to support both cooperative threading (like COOP)
and pre-emptive threading (pthreads).

> The implementation of Guile till 1.3.4 is (1), and now is (2),
> I believe.
> 
> With threads support, signal handling of the model (1) is very
> difficult to implement.  If signal handler is invoked with holding
> some locks, it results dead-lock.  Practically, there's no way
> use of signal in threaded program.

We will probably keep the current system for handling signals, that is
a signal sets an async, which, in turn, is invoked at a safe place.

Dirk, I feel very much like a "stopper" for this development.  Could
you please pick up this work and coordinate the efforts between you
and Niibe?  If there are questions that I need to answer or work upon,
could you please give them to me again?  (Really sorry for not doing
more.  Hope to do more for Guile after I've returned to Sweden in
May.)

Best regards,
Mikael



reply via email to

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