This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: guile and multi-threading


"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.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]