From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: crypt mutex Date: Fri, 20 Feb 2004 22:24:37 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87znbdi85m.fsf@zip.com.au> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077334018 11898 80.91.224.253 (21 Feb 2004 03:26:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2004 03:26:58 +0000 (UTC) Cc: djurfeldt@nada.kth.se Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 21 04:26:48 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AuNmy-00058b-00 for ; Sat, 21 Feb 2004 04:26:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AuNmP-0006Ch-9V for guile-devel@m.gmane.org; Fri, 20 Feb 2004 22:26:13 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AuNlh-0005t7-AA for guile-devel@gnu.org; Fri, 20 Feb 2004 22:25:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AuNl6-0005Lb-Vl for guile-devel@gnu.org; Fri, 20 Feb 2004 22:25:24 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AuNl6-0005IU-Ka for guile-devel@gnu.org; Fri, 20 Feb 2004 22:24:52 -0500 Original-Received: from witch ([209.150.45.158]) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1AuNkx-0005Ms-00; Sat, 21 Feb 2004 04:24:43 +0100 Original-Received: from mdj by witch with local (Exim 3.35 #1 (Debian)) id 1AuNkr-0001Wr-00; Fri, 20 Feb 2004 22:24:37 -0500 Original-To: guile-devel@gnu.org, mvo@zagadka.ping.de In-Reply-To: <87znbdi85m.fsf@zip.com.au> (Kevin Ryde's message of "Sat, 21 Feb 2004 10:32:53 +1000") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3419 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3419 Kevin Ryde 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. I think it is completely OK to specify that certain resources are not thread safe, and that if a user writes a threaded program which uses such resources in parallel, he needs to himself supply necessary mutexes etc. 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. M _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel