This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: guile and multi-threading
- To: "Lars J. Aas" <larsa at sim dot no>
- Subject: Re: guile and multi-threading
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 31 Aug 2000 17:23:17 +0200
- Cc: guile at sourceware dot cygnus dot com, djurfeldt at nada dot kth dot se
- Cc: djurfeldt at nada dot kth dot se
- References: <20000831162854.A1682@sim.no> <xy7bsy97atu.fsf@mdj.nada.kth.se><20000831165459.A1736@sim.no>
- Reply-To: djurfeldt at nada dot kth dot se
"Lars J. Aas" <larsa@sim.no> writes:
> OK, so what I should do is to use Guile to spawn the threads to be
> able to do multi-threading in Guile-space?
Yes.
> Is the IPC API for Guile threads documented somewhere?
Currently, the best documentation is the source code.
You use scm_spawn_thread to spawn threads and scm_internal_select for
communication (so that the cooperative threads don't block).
The interface to mutecis, condition variables and thread-local data is
very similar to the pthread one, but with scm_ instead of pthread_ as
prefix.
For details of these calls, have a look at libguile/coop-defs.h.
(We're working on a cleanup of this part of Guile. Yes, this might
mean some changes, but those will mostly be cosmetic. All current
functionality will continue to exist.)