This is the mail archive of the guile@sourceware.cygnus.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: Threads in Guile


On 31 May 2000, Mikael Djurfeldt wrote:

> We should put it on a cvs branch.  You could do that now.  That would
> make it easier to cooperate.

Do you have any hints about that?  I. e. how should that branch be named
etc.

> > 2) the code from coop-defs.h, coop-threads.[ch] and coop.c is merged into
> >    the files guile-qthreads.[ch].  This is the glue code between the
> >    generic threads interface and the qthreads library.
> 
> You should probably replace the name "qthreads" with "coop".  Guile is
> using coop threads, which are built upon qthreads.  The guile-coop
> glue should probably not refer in any way to qt, btw.
> 
> Your guile-qthreads.c should be split into coop.c, having no reference
> to Guile, and guile-coop.c, which is the glue code.

So, to see if I have understood everything:  In the case of the coop
threads we would have the following structure:
- guile uses its abstract thread interface.
- one thread implementation is called 'coop-threads'.  This implementation
  is based upon the qthreads library, but this is an implementation detail
  of the coop-threads implementation.  (*)
- the glue code is in guile-coop.c

And, the relationships between these parts are as follows:
- guile has no reference to anything from coop-threads, coop and qthreads
- coop-threads has references to guile and coop, but no references to
  qthreads. (*)
- coop has only references to qthreads
- qthreads has no references to any of the other packages.

The points marked with (*) are the ones that I am not sure about:  Shall
the fact that coop uses qthreads as its implementation be strongly hidden,
i. e. should it be possible to implement coop with something else than
qthreads without need to change guile-coop.[ch] ?

Best regards
Dirk


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