From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: port-for-each vs lazy sweep Date: Thu, 23 Aug 2007 09:25:09 +0200 Message-ID: <871wduk90q.fsf@chbouib.org> References: <878x88pbcc.fsf@zip.com.au> <87hcmuha1s.fsf@laas.fr> <87zm0lu3tr.fsf@zip.com.au> <87ps1f850f.fsf@zip.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187853967 20642 80.91.229.12 (23 Aug 2007 07:26:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2007 07:26:07 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Aug 23 09:26:05 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IO74r-0006Sv-Kl for guile-devel@m.gmane.org; Thu, 23 Aug 2007 09:26:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IO74q-0000ft-Rf for guile-devel@m.gmane.org; Thu, 23 Aug 2007 03:26:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IO74l-0000bP-3t for guile-devel@gnu.org; Thu, 23 Aug 2007 03:25:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IO74j-0000WO-1U for guile-devel@gnu.org; Thu, 23 Aug 2007 03:25:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IO74i-0000Vv-Qh for guile-devel@gnu.org; Thu, 23 Aug 2007 03:25:52 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IO74i-0001F0-7g for guile-devel@gnu.org; Thu, 23 Aug 2007 03:25:52 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IO74g-0004Fz-DQ for guile-devel@gnu.org; Thu, 23 Aug 2007 03:25:50 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IO74c-00089K-Nt for guile-devel@gnu.org; Thu, 23 Aug 2007 09:25:47 +0200 Original-Received: from adh419.fdn.fr ([80.67.176.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2007 09:25:46 +0200 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Aug 2007 09:25:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i486-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:1+ThNnl/eetn40p3jQ+GRnxHovU= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:6739 Archived-At: Hi, Kevin Ryde writes: > Actually I see the flush func of a soft port is entirely unused, it's > never called by a force-output because nothing is ever put in the port > buffer as such. The manual could be clearer about what it's supposed to > be for :-(. Maybe that's a bug, maybe it was meant to be called. We could fix this in HEAD, but maybe not in 1.8, in case programs rely on it. > At any rate, I put in the failing test below for port-for-each, and I > think flush-all could benefit from the rewrite below, just on general > principles. I agree with the latter. > +(with-test-prefix "port-for-each" > + > + ;; In guile 1.8.0 through 1.8.2, port-for-each could pass a freed cell to > + ;; its iterator func if a port was inaccessible in the last gc mark but > + ;; the lazy sweeping has not yet reached it to remove it from the port > + ;; table (scm_i_port_table). Provoking those gc conditions is a little > + ;; tricky, but the following code made it happen in 1.8.2. > + (pass-if "passing freed cell" > + (throw 'unresolved) The above line should be removed. :-) Once this line is removed, the test fails consistently here (HEAD), which is good news I suppose. > + (open-input-file "/dev/null") `(%make-void-port "r")' would have the same effect but would be more portable. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel