Stas Bekman wrote:

Philippe M. Chiasson wrote:

Stas Bekman wrote:

Philippe M. Chiasson wrote:

Stas Bekman wrote:

Philippe M. Chiasson wrote:

I noticed browsing some code that there is a threaded_mpm field in mp's server config structure.

That is a global proprety and doesn't have to live in the server config, so this patches replaces
that code with the (already there, but not used) threaded_mpm global.

It doesn't make a significant speed/memory improvement, but it removes a bit of unnecessary
logic.






I wonder why do we need the modperl_global_ interface for that. Won't a static variable do the trick?





Well, correct me if I am wrong, but I just thought the modperl_global_ interface was there mainly to clearly
identify globals and centralize their managments. So that's why I thought it should be used.

I guess the more important question is : What is the modperl_global_ interface intended for ?




it's intended for manipulating globals while running workers, e.g.:

lock_mutex
set_global_foo
unlock_mutex

in another thread:

lock_mutex
get_global_foo
unlock_mutex



Yes, that's correct. (locking/unlocking isn't necessary since get_global_foo takes care of it)


is does? I don't think so. It provides the API to do so, but doesn't do that on get_/set_.

Yes, I don't know what I was looking at. It only provides the API for it.

In any case, I've made the change to a plain old global and checked it in.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to