From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: What are the arguments in favor of delay/force in eval.c? Date: Wed, 07 Dec 2005 16:52:30 -0800 Message-ID: <874q5kmmup.fsf@trouble.defaultvalue.org> References: <87hd9mgc7v.fsf@trouble.defaultvalue.org> <87acfcfvbr.fsf@zip.com.au> <87y82wo78b.fsf@trouble.defaultvalue.org> <8764q0fn2f.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134004775 1360 80.91.229.2 (8 Dec 2005 01:19:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2005 01:19:35 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 08 02:19:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkAQo-0000GC-CG for guile-devel@m.gmane.org; Thu, 08 Dec 2005 02:18:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkAR4-00024P-CS for guile-devel@m.gmane.org; Wed, 07 Dec 2005 20:19:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkA1j-00079k-W0 for guile-devel@gnu.org; Wed, 07 Dec 2005 19:52:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkA1i-000781-F4 for guile-devel@gnu.org; Wed, 07 Dec 2005 19:52:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkA1h-00077W-Kq for guile-devel@gnu.org; Wed, 07 Dec 2005 19:52:49 -0500 Original-Received: from [70.85.129.156] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkA2d-0001iS-Ih for guile-devel@gnu.org; Wed, 07 Dec 2005 19:53:47 -0500 Original-Received: from omen.defaultvalue.org (localhost [127.0.0.1]) by defaultvalue.org (Postfix) with ESMTP id E4B6B90D2B for ; Wed, 7 Dec 2005 18:52:31 -0600 (CST) Original-Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by omen.defaultvalue.org (Postfix) with ESMTP id 837F6410E for ; Wed, 7 Dec 2005 16:52:31 -0800 (PST) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 643823C1001; Wed, 7 Dec 2005 16:52:30 -0800 (PST) Original-To: guile-devel@gnu.org In-Reply-To: <8764q0fn2f.fsf@zip.com.au> (Kevin Ryde's message of "Thu, 08 Dec 2005 11:29:44 +1100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5490 Archived-At: Kevin Ryde writes: > An even more radical idea would be not to have a mutex at all. If > two threads are simultaneously forcing then whichever finishes first > sets the forced value. (The same way that recursive forcing results > in the first finisher setting the value.) This would only work if you forbid side-effects, right? Either that, or perhaps we'd just have to document the resulting semantics, whatever they are. I was also wondering about the possibilities for deadlock with the current code, and then what they might be with a srfi-45 force, which may do more work (it's basically a trampoline approach to the problem described in the srfi). I suppose one of the questions here (and one of the traditional questions) is just how much protection/overhead Guile should try to provide by default. > (Oh, and to bring this slightly back on-topic, I'm imagining that if > streams or lazy stuff throw off quite a few forced promises then it's > a good thing for them to be small and fast.) Quite possibly. -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel