From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-devel@gnu.org
Subject: Re: crypt mutex
Date: Mon, 23 Feb 2004 20:12:42 +0100 [thread overview]
Message-ID: <87znb98v9x.fsf@zagadka.ping.de> (raw)
In-Reply-To: <xy71xopktca.fsf@nada.kth.se> (Mikael Djurfeldt's message of "Fri, 20 Feb 2004 22:24:37 -0500")
Mikael Djurfeldt <djurfeldt@nada.kth.se> writes:
> Kevin Ryde <user42@zip.com.au> writes:
>
>> While nosing around the crypt function, I wondered if it ought to have
>> a mutex, just in case two threads run it concurrently.
>
> We probably need a policy which regulates when to have and when to not
> have a mutex.
>
> Personally, I wouldn't like Guile to have everything thread-safe
> "under the hood". That would be a terrible waste of resources.
Yes. Also, what does 'thread-safe' mean, aynway? (This question is
probably just a nother way to ask what you are asking...) For
example, can lists be meaningfully made thread safe?
> [...]
>
> So, the policy needs to specify where the border between Guile and
> user responsibility goes. In most cases, I would probably draw the
> line so that as much as possible of the responsibility is left to the
> user with the exceptions that 1. Guile should never segfault due to
> misuse in this respect, and, 2. Guile need to have enough thread
> safety so that it's reasonably convenient to write parallel programs.
Yes, exactly my view. Also, I would broaden point 1 a bit: we should
also 'fix' functions that can not every be used in a threaded program
without mutexes around them. Like libc getpwent. They might not
segfault, but you can't use them anyway in a threaded program.
--
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
next prev parent reply other threads:[~2004-02-23 19:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-21 0:32 crypt mutex Kevin Ryde
2004-02-21 3:24 ` Mikael Djurfeldt
2004-02-21 3:26 ` Mikael Djurfeldt
2004-02-23 19:15 ` Marius Vollmer
2004-02-21 21:50 ` Kevin Ryde
2004-02-23 19:16 ` Marius Vollmer
2004-02-23 19:12 ` Marius Vollmer [this message]
2004-02-23 19:46 ` Mikael Djurfeldt
2004-02-23 19:55 ` Mikael Djurfeldt
2004-02-24 1:11 ` Andreas Voegele
2004-02-24 1:22 ` Mikael Djurfeldt
2004-03-20 22:39 ` Marius Vollmer
2004-03-20 22:51 ` Kevin Ryde
2004-07-23 23:53 ` Kevin Ryde
2004-02-23 20:01 ` Mikael Djurfeldt
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=87znb98v9x.fsf@zagadka.ping.de \
--to=mvo@zagadka.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).