One of the fun aspects of this is that the dark-blue-going-
on-purple book (which I have) describes how global variables
are sometimes shared between threads if they're not declared
shared, while your linked page says "only data that is
explicitly requested to be shared will be shared between
threads".

I think both are correct within their frame of reference,
the latter page is not talking about mod_perl2 nor threads
created by Apache2.

I used to like new subjects to learn about...
cmac


On Dec 29, 2008, at 2:37 PM, André Warnier wrote:

cr...@animalhead.com wrote:
[...]
My own not very reliable 2 cent :

The mod_perl 2 User's Guide (Pub: Onyx Neon, authors: Stas Beckman and Jim Brandt) has apparently only part of 2 pages (365-366) on the subject. Also, the Suse Enterprise Linux 10.x system that I recently installed for a customer has a worker (threaded) Apache2 + mod_perl2 installed by default. None of the above constitute firm recommendations, but in the absence of forecasts of doom, I would tend to see these as encouraging signs.

Apart of the usual warnings about the underlying thread-safety of underlying C libraries, there are apparently a couple of potentially nasty side-effects, such as if you would be using chdir () in some of your modules (because a chdir in one thread affects all the others). There is a reference in the book to this, which I have not checked myself :
http://www.perl.com/lpt/2002/06/11/threads.html

Reply via email to