perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2 patch] anon subs B::Deparse deployment replacement
Date Wed, 03 Nov 2004 23:35:41 GMT
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>> Stas Bekman wrote:
>>
>>> This patch replaces the B::Deparse logic for anonsubs with a different
>>> approach.
>>
>>  
>> Any comments?
> 
> 
> Sorry, I thought I had replied to that one.
> 
> Stas Bekman wrote:
> 
>> - i'm not sure if I can use a static global variable as a mutex (see
>>    XXX in the patch)

> I don't think there is a problem with that. But couldn't the 
> modperl_global.*
> stuff be used for this instead ?

I thought of that.

1) I'm not sure it's a good idea to use a single mutex for several 
unrelated tasks. That'll slow things down.

2) I'm not sure how to get hold of that modperl_global variable when we 
need it.

>> - should we do mutex locking only for threaded mpm? (see XXX in the
>>    patch) in which case, it's probably going to be too expensive to
>>    test modperl_threaded_mpm or not?).
> 
> 
> Well, first, you modperl_threaded_mpm isn't expensive anymore:
> 
>   static int MP_threaded_mpm = 0;
>   int modperl_threaded_mpm(void)
>   {
>       return MP_threaded_mpm;
>   }
> 
> But, really, we should be able to reuse either some of the modperl_global.*
> stuff for this or the APR_ANYLOCK stuff so that we can get mutex locking
> for threaded mpms and near 0-overhead for prefork.

as for modperl_global_* please see above.

as for APR_ANYLOCK, why doug has used the perl locking routines in first 
place?

-- 
__________________________________________________________________
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


Mime
View raw message