perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: [mp2] pools that go out of scope aren't a problem anymore?
Date Mon, 06 Dec 2004 05:05:52 GMT
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> [...]
> 
>> For instance, for each request, we create a modperl_request_pool() and 
>> $r->pool returns that,
>> not the underlying $r->pool. We just register a cleanup handler with 
>> $r->pool to destroy our
>> request pool, but use a refcount technique to figure out if the pool 
>> can be safely freed. If not,
>> we either die verbosely, or just warn about it
>>
>>  "Warning: prolonging the lifetime of request pool at foo/bar.pl line 
>> 232"
>>
>> Certainly possible to implement, but I am just not sure we can justify 
>> this added magic/complexity
>> simply for the sake of catching improper uses of the API.
> 
> Too complicated. It's not worth the very small probability of people 
> writing this kind of really bad code.

As long as we are ready to help/support the few people that _do_ write that
kind of bad code, I am happy not having to implement something like that.

>>> Unfortunately it doesn't seem like this dependency code can be easily 
> [...]

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message