From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15746 invoked by alias); 12 Oct 2005 16:51:15 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 15726 invoked by uid 22791); 12 Oct 2005 16:51:12 -0000 Received: from 62-177-154-238.static.bbeyond.nl (HELO lembu.sumatrasoftware.com) (62.177.154.238) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 12 Oct 2005 16:51:12 +0000 Content-class: urn:content-classes:message Subject: RE: [cp-patches] [PATCH] Fix PR classpath/24086, PR classpath/24091, PR classpath/24104 et al. ... Date: Wed, 12 Oct 2005 16:51:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-ID: From: "Jeroen Frijters" To: "David Daney" Cc: "Java Patch List" , "Classpath Patches" X-SW-Source: 2005-q4/txt/msg00078.txt.bz2 David Daney wrote: > Jeroen Frijters wrote: > > David Daney wrote: > >=20 > > LimitedLengthInputStream shouldn't have a finalize(). >=20 > Let's consider the case where a client program did not read=20 > the entire body of the response: >=20 > As implemented in the patch, the finalize is indeed needed to=20 > clean up the mess and return the connection to the connection > pool. I understand that was the motivation, but I just don't agree with it. Even *if* you wanted to do this, you should use a PhantomReference to keep track of the lifetime of the LimitedLengthInputStream instead of a finalize method. > However I have been going back and forth on this matter, and=20 > now am of the opinion that if a client does not read the entire body > that the connection should just be abandoned and not returned to the=20 > pool. Think of the case where you only read a little bit from the > head of a very large response body. In this case do you want the > runtime to read and throw away the rest of the body (which could > have unbounded size) just so it can reuse the connection?=20 > I am starting to think not. Exactly. Another issue is that finalize (or the PhantomReference solution) introduces non-determinisme that IMO simply does nobody any favors. > > I vote yes. >=20 > Thanks for the vote, but what I really am looking for is official=20 > permission. There is no official owner. If nobody complains in a couple of days, just go ahead and commit. As long as you don't commit too close to a snapshot release date, any left over issues will get worked out. In any case, I believe your implementation is a big step forward. Regards, Jeroen