Re: PerlModule lifetime / threads

Perrin Harkins <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Thu, May 20, 2010 at 11:17 AM, Some Guy <[email protected]> wrote:
> If the MPM is threaded, a rwlock is used where the cleanup obtains the
> writelock and request handlers are obtaining a read lock.

You don't need to do this.  Variables are not shared between perl
threads unless you make them shared.  If you avoid this, your code
will work with the more common prefork MPM as well.

> I threw a sleep in the cleanup to see what happens, and it appears to delay
> sending the results of the next request.

It doesn't do that for me.  Maybe you're running with only one
process/thread/interpreter?

- Perrin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.