perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
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 

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message