From: Mikael Djurfeldt <mdj@kvast.blakulla.net>
Cc: guile-devel@gnu.org
Subject: Re: Redoing conditional thread support
Date: 15 Oct 2002 15:00:31 +0200 [thread overview]
Message-ID: <xy7zntfluvk.fsf@linnaeus.i-did-not-set--mail-host-address--so-shoot-me> (raw)
In-Reply-To: <ljzntmjqju.fsf@burns.dt.e-technik.uni-dortmund.de>
Marius Vollmer <marius.vollmer@uni-dortmund.de> writes:
> I'm about to reorganize our conditional threading stuff so that there
> is always a thread API (scm_current_thread, scm_call_with_new_thread,
> mutices, condition variables, etc), but when you configure
> "--without-threads" you get a null-thread implementation that doesn't
> allow the creation of new threads. Thus there will always be only a
> single thread.
>
> This should make it easier to write code that is thread aware but
> doesn't require threads, like the thread-aware sigaction function.
>
> Objections?
On the contrary, but Dirk has already made a lot of work on such a
reorganization. I think there's a branch in the repository which made
a good deal of the way there, if I remember correctly. Dirk?
The idea was to use a similar technique as has been used in glib,
i.e., a datastructure with a "jump-table" where the initialization
routine of a thread library can "plug in" its C level functions. The
default values in this datastructure would be the "null" thread
implementation.
The thread interface would be generic enough to allow both for
cooperative threading and pre-emptive threading. This way, users who
like coop could link guile together with a "libcoop" library and users
who want pthreads could link it with "libguile-pthread" +
"libpthread", while users who don't need threading would not link with
any external thread library.
An important point was that the decision whether to have thread
support or not should *not* be made at compile time since this is a
decision which should be up to the application developer. This is
possible with the "jump-table" approach described above.
Dirk and I got a long way towards implementing this. For example, the
data structure mentioned above is implemented. I'll try to dig up old
documentation + code if you are interested.
Best regards,
Mikael
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-10-15 13:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 14:51 Redoing conditional thread support Marius Vollmer
2002-10-11 21:37 ` Neil Jerram
2002-10-11 22:49 ` Marius Vollmer
2002-10-12 19:38 ` Neil Jerram
2002-10-15 4:35 ` Christopher Cramer
2002-10-15 10:43 ` Marius Vollmer
2002-10-15 13:00 ` Mikael Djurfeldt [this message]
2002-10-15 18:28 ` 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=xy7zntfluvk.fsf@linnaeus.i-did-not-set--mail-host-address--so-shoot-me \
--to=mdj@kvast.blakulla.net \
--cc=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).