From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Recursive mutexes? Date: 26 Oct 2002 22:35:58 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87r8edos41.fsf@zagadka.ping.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035664616 14690 80.91.224.249 (26 Oct 2002 20:36:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Oct 2002 20:36:56 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 185Xfx-0003og-00 for ; Sat, 26 Oct 2002 22:36:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 185XgA-0002U5-00; Sat, 26 Oct 2002 16:37:06 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 185XfW-00028n-00 for guile-devel@gnu.org; Sat, 26 Oct 2002 16:36:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 185Xf7-0001gO-00 for guile-devel@gnu.org; Sat, 26 Oct 2002 16:36:09 -0400 Original-Received: from mail.dokom.net ([195.253.8.218]) by monty-python.gnu.org with esmtp (Exim 4.10) id 185Xf5-0001cO-00 for guile-devel@gnu.org; Sat, 26 Oct 2002 16:35:59 -0400 Original-Received: from dialin.speedway42.dip231.dokom.de ([195.138.42.231] helo=zagadka.ping.de ident=qmailr) by mail.dokom.net with smtp (Exim 3.32 #2) id 185Xfi-00082O-00 for guile-devel@gnu.org; Sat, 26 Oct 2002 22:36:38 +0200 Original-Received: (qmail 27384 invoked by uid 1000); 26 Oct 2002 20:35:58 -0000 Original-To: guile-devel@gnu.org Original-Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1602 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1602 Our current coop mutexes are not 'recursive'. This means that a thread blocks when it tries to lock a mutex that it already has locked. I think we should make our mutexes be recursive by default. Expecting to block when locking a mutex that is already lcoked by one self is not very useful, since no one can unlock that mutex (excepts asyncs). The only good argument against recursive mutexes that I can think of is a tiny performance gain since you don't need to do some checking. SRFI-18 specifies non-recursive mutexes and allows non-owning threads to unlock a mutex. Such uses of a mutex are, in my view, a mockery of condition variables should be avoided. If non-recursive mutexes turn out to be important, we can provide them as well, as an option. Ok? -- 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