From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: What are the arguments in favor of delay/force in eval.c? Date: Thu, 08 Dec 2005 11:29:44 +1100 Message-ID: <8764q0fn2f.fsf@zip.com.au> References: <87hd9mgc7v.fsf@trouble.defaultvalue.org> <87acfcfvbr.fsf@zip.com.au> <87y82wo78b.fsf@trouble.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134004219 32645 80.91.229.2 (8 Dec 2005 01:10:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2005 01:10:19 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 08 02:10:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkAGb-00063O-Jf for guile-devel@m.gmane.org; Thu, 08 Dec 2005 02:08:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkAGr-0004j4-Nq for guile-devel@m.gmane.org; Wed, 07 Dec 2005 20:08:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ek9g2-0008RF-UF for guile-devel@gnu.org; Wed, 07 Dec 2005 19:30:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ek9fu-0008Ph-Bw for guile-devel@gnu.org; Wed, 07 Dec 2005 19:30:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ek9fu-0008Pd-0W for guile-devel@gnu.org; Wed, 07 Dec 2005 19:30:18 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ek9gp-0005qp-9n for guile-devel@gnu.org; Wed, 07 Dec 2005 19:31:15 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jB80TruS009536; Thu, 8 Dec 2005 11:29:53 +1100 Original-Received: from localhost (ppp2468.dyn.pacific.net.au [61.8.36.104]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jB80TqvE016555; Thu, 8 Dec 2005 11:29:53 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1Ek9fN-0002dv-00; Thu, 08 Dec 2005 11:29:45 +1100 Original-To: Rob Browning Mail-Copies-To: never In-Reply-To: <87y82wo78b.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Wed, 07 Dec 2005 14:47:00 -0800") 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:5489 Archived-At: Rob Browning writes: > > Note that this wouldn't be safe if the initial mutex assignment might > copy a value that has been half filled by some other thread. Yep, a single fetch is assumed to be ok in other places too. 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.) (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.) _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel