unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: guile-devel@gnu.org
Subject: Re: Redoing conditional thread support
Date: 12 Oct 2002 00:49:57 +0200	[thread overview]
Message-ID: <874rbsr3oq.fsf@zagadka.ping.de> (raw)
In-Reply-To: <m3k7ko8xo7.fsf@laruns.ossau.uklinux.net>

Neil Jerram <neil@ossau.uklinux.net> writes:

> >>>>> "Marius" == Marius Vollmer <marius.vollmer@uni-dortmund.de> writes:
> 
>     Marius> This should make it easier to write code that is thread
>     Marius> aware but doesn't require threads, like the thread-aware
>     Marius> sigaction function.
> 
>     Marius> Objections?
> 
> Not really, but I'm not sure that this motivation makes sense in
> detail, because we could (I think) provide a null implementation like
> this in Scheme:
> 
> (define-module (ice-9 thread-api-even-if-no-threads))
> 
> (or (defined? 'try-mutex)
>     (define (try-mutex m) #t))
> etc.

That's what I plan to do, in essense.  I want to do it on the C level,
tho, so that C code can just pretend that there is always the concept
of threads and doesn't need to special case when Guile is configured
without real thread support.

The thing is mostly finished, but I got a bit over-ambitious and
implemented almost-real-mutices since Tom made me see that asyncs
could be used to have some kind of cooperating concurrency and so even
without real threads you might want to have mutices and condition
variables, etc.  Something to make a real thread head writhe, I'm
afraid.

> But perhaps there are other benefits?

We can get rid of USE_THREADS and some code will become cleaner and
easier to maintain.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


  reply	other threads:[~2002-10-11 22:49 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 [this message]
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
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=874rbsr3oq.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --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).