[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: threads in 1.7.1
Re: threads in 1.7.1
Wed, 13 Oct 2004 17:09:26 -0400
Thanks for the response, Neil. I'll have a go at implementing it.
Regarding the disappearance of coop threads: a cursory look through
the Guile source seems to indicate that mvo implemented the Pthread
stuff as a sort of plugin to the thread-handling code, so that you
could probably add a coop-threading implementation, based on, say, the
wonderful GNU Pth library, and you select which you wanted to use at
compile time (or even at runtime, with some rewriting). Of course,
the behavior of your Scheme code would be dramatically different,
depending on the threading paradigm, and people might not like that
On Wed, 13 Oct 2004 20:01:39 +0100, Neil Jerram <address@hidden> wrote:
> Julian Graham wrote:
> > If I started trolling, do you think I'd get more responses to my
> > question?
> I wonder the same myself :-)
> > Just kidding. Anyway, I know you're all busy with real
> > work and the like, but Marius (since I'm told this is pretty much your
> > domain) -- is there any reason that Guile *shouldn't* support thread
> > cancellation? I was thinking maybe I'd just try to write it myself
> > and submit a patch, unless there was some philosophical opposition to
> > that idea.
> FWIW, with me not being at all an expert on this area:
> - It isn't yet possible to have more than one thread of C code call
> Guile functions.
> - Guile's threads in 1.7.1, OTOH, are compatible with Posix threads,
> because they are Posix threads. In more detail:
> - Guile 1.6.x supported coop threads, and kind-of Posix threads (with
> some kind of hack I believe)
> - Guile 1.7.x has dropped coop threads, and now only supports Posix
> (I'm not sure of the rationale for dropping coop threads; personally
> I'm a fan of them.)
> - I doubt it would Just Work to call pthread_cancel on a Scheme thread,
> because of the per-thread state that Guile maintains. I'd guess,
> though, that it shouldn't be hard to add cancellation support, given
> that Guile threads are now Posix threads.
> Hopefully this is all sufficiently inaccurate that someone will be
> forced to correct it :-)