Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 3231 invoked from network); 22 Dec 2004 04:53:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Dec 2004 04:53:12 -0000 Received: (qmail 73609 invoked by uid 500); 22 Dec 2004 04:53:11 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 73590 invoked by uid 500); 22 Dec 2004 04:53:11 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 73575 invoked by uid 99); 22 Dec 2004 04:53:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 21 Dec 2004 20:53:07 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id 985E51E1D14; Wed, 22 Dec 2004 05:53:04 +0100 (CET) Message-ID: <41C8FDAF.3000805@stason.org> Date: Tue, 21 Dec 2004 23:53:03 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Joe Schaefer Cc: dev@perl.apache.org Subject: Re: [mp2] pool object dependant methods insanity References: <41C4640A.4030701@stason.org> <41C8D0CE.30704@stason.org> <87hdmfghmp.fsf@gemini.sunstarsys.com> <41C8E581.1070603@stason.org> <87acs7gd8t.fsf@gemini.sunstarsys.com> In-Reply-To: <87acs7gd8t.fsf@gemini.sunstarsys.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Schaefer wrote: >>> $bucket->setaside($pool); >>>that means "this bucket may need to live as long as this pool does". >>>If we change the semantics to "this pool needs to live as long as >>>this bucket does", IMO we've made a mistake. If you agree, then I >>>think mpxs_APR__Bucket_setaside can be removed from the list. >> >>I haven't analized the actual methods yet, other than checking that >>they return an object. >> >>I agree that this is a tricky issue with this method. But if you don't >>tie the pool along with the setaside data, how is it going to be >>preserved if the pool will be gone? the setaside data will become >>corrupted, no? > > > Sure, that could happen. Thinking about it a bit more, perhaps your > first guess is right. Restating the semantics with a cleaner > separation of (Perl) variable from (C) value: > > $bucket->setaside($pool) means > > the apr_bucket_t attached to this APR::Bucket object needs to > survive as long as the underlying apr_pool_t. However, if > that apr_pool_t is owned by some APR::Pool object, that object > should [*] survive at least as long as the APR::Bucket object does. > > Agreed? If so, then setaside() does belong on the list. > > [*] - "should", not "must", because people can always explicitly > destroy the pool. +1 -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org