perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject add_config() and thread-safety
Date Sat, 18 Mar 2006 00:39:02 GMT
I've been looking at the failure Randy reported with t/api/add_config failing
when run multiple times.

Took a while, but I finally got my eyes open today. It's an issue of thread-safety
that was completely overlooked.

Trying to do something like:

$r->add_config(['<Location /foo>',[...],'</Location>']);

Is not, and cannot be thread-safe, as it needs to access the server's core config
at one point, leading to all sort of nastyness.

Another way to achieve the same thing is with:


At request-time.

With preform, this will work, but obviously, only affect the current child process.

In my opinion, this is way *wrong* and needs to be fixed. Similarly to how .htaccess
files work, you should only be able to affect configuration of the current request
when using add_config() at request time.

It's been fixed/implemented in r386774. (It's not documented yet, patches welcome)

Randy, I'd like to know if your test failure dissapears with this change.

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

View raw message