unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <djurfeldt@nada.kth.se>
Cc: guile-devel@gnu.org
Subject: Re: future thread interface
Date: Sat, 05 Jul 2003 14:05:49 +0200	[thread overview]
Message-ID: <xy7he61b2le.fsf@nada.kth.se> (raw)
In-Reply-To: <87vfumtudg.fsf@zagadka.ping.de> (Marius Vollmer's message of "01 Jul 2003 12:27:07 +0200")

Marius Vollmer <mvo@zagadka.de> writes:

> Christopher Cramer <crayc@pyro.net> writes:
>
>> 1. The goal is to be able to pick between different thread
>> implementations. When is this choice actually supposed to be made: compile
>> time, link time, during Guile startup, or when? Right now (looking at CVS)
>> it's compile time, but it looks like the goal is during Guile startup;
>> It just doesn't seem to be stated anywhere.
>
> In my view, the goal is to avoid to have to chose.  That is, Guile
> should be written against the POSIX pthread API only.  When people
> have a need for a non-standard threading implementation, that
> implementation should offer the pthread API and Guile can then use it
> transparently.
>
> We offer one such pthread-'ersatz' implementation with Guile:
> null-threads.  This implementation is used on platforms that don't
> have pthreads.  Null-threads do not offer real threading, but the API
> is there and you can write your code in a thread-aware fashion even
> when no threads can ever be created.

I posted an analysis of the thread situation on this list before
Christmas.  I think you agreed with the conclusions.

Although nothing you say above really contradicts what we agreed upon
earlier, I wanted to post this message because one might get the
impression from your message that null-threads is intended to be
selected compile time only on platforms which don't have pthreads.

In contrast, among the conclusions were rather the need to enable the
application itself to select what thread package to use during Guile
startup.  I've written the latest thread code with this in mind.  The
API for this (threads-plugin.c) is intended to be mostly indentical
with the pthreads API, as you say, but will need to contain some extra
entries.  Note, though, that the code is not yet complete.  (I think
we agreed that you would complete the null-threads part, no? :)

Also, in my view, we should provide a rewritten version of COOP
threads as an option for this plugin interface.  (But that option
should be provided in a separate dynamically loadable library, while
pthreads and null threads are options provided in libguile itself.)

I'll commit my thread situation analysis text to the workbook.

Best regards,
Mikael D.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  parent reply	other threads:[~2003-07-05 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01  6:32 future thread interface Christopher Cramer
2003-07-01 10:27 ` Marius Vollmer
2003-07-01 18:57   ` Christopher Cramer
2003-07-05 12:05   ` Mikael Djurfeldt [this message]
2003-07-27 16:51     ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xy7he61b2le.fsf@nada.kth.se \
    --to=djurfeldt@nada.kth.se \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).