Stas Bekman wrote:
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.

As far as I can see, each different modperl_global entrie defined with the use of MP_GLOBAL_DECL() gets it's own mutex.

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

You don't need it. You can just : MP_GLOBAL_DECL(anonsub_cnt, int)

And you then get modperl_global_get_anonsub_cnt() for free.


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

Only reason I can see is that if you use Perl's locking routines, when they are not needed (i.e. no-ithreads), they are #defined as no-ops, while apr_anylock stuff does have a small overhead even if you pick the apr_anylock_none type (one pointer dereferencing + integer cmp).

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to