[188] in Pthreads mailing list archive
Scheme binding for pthreads
daemon@ATHENA.MIT.EDU (William S. Gribble)
Wed Nov 1 16:17:31 1995
From: "William S. Gribble" <grib@cs.utexas.edu>
Date: Wed, 1 Nov 1995 14:42:52 -0600
To: beshers@cs.columbia.edu
Cc: pthreads@MIT.EDU, gel@cygnus.com
In-Reply-To: <199511011844.NAA16238@tune.cs.columbia.edu> (message from Clifford Beshers on Wed, 1 Nov 1995 13:44:19 -0500)
[this was originally posted to the pthreads@mit.edu mailing list,
but I'm cc'ing it to the Guile list since it is relevant]
I just ran a quick test that convinces me that pthreads will work with
Guile, but there will be som sticky points . Ability to handle
continuations and asynchronous signals correctly implies that libguile
is reentrant, so I just gave it a go.
I've been running with Guile in a single pthread. I wrote a
little scheme function (call-in-thread thunk) which creates a
new PThread which calls gscm_apply() on thunk with no arguments. In trivial
test cases, multiple threads coexist fine. When I wrote a garbage-
generating function that causes lots of GC, however, Guile lost it,
I guess during GC, printing lots of this:
ERROR: Wrong type argument in position 1 to apply: #<unknown-type
(0x7f . 0x175748) @ 0x175750>
Clues or directions to attack the problem of running multiple threads
in Guile are appreciated.
Bill Gribble