Sharing variable in threaded mpm not working as expected

2011-08-02 Thread Pawel Herman
Hello, I have read all the related documentation (at least those that I found) and I still cannot understand why the little program I wrote below does not share the variable as I would expect. The log file that I created clearly shows that we are running in a single process. Some threads see the

Re: Sharing variable in threaded mpm not working as expected

2011-08-02 Thread Pawel Herman
; interpreters to handle the request, up until this number of > interpreters is reached. when PerlInterpMax is reached, mod_perl will > block (via COND_WAIT()) until one becomes available (signaled via > COND_SIGNAL()). > > On Tue, Aug 2, 2011 at 12:06 AM, Pawel Herman wrote: >&g

Re: Sharing variable in threaded mpm not working as expected

2011-08-04 Thread Pawel Herman
Hello Torsten, I tried your suggestions push(@fruits,share('apple')); and push(@fruits,share(do {my $x='apple'})); but both did not work because share can only take references, arrays, or hashes as input. I tried similar variations but no luck. The fruits array is still initialized multiple time

Re: Sharing variable in threaded mpm not working as expected

2011-08-08 Thread Pawel Herman
Hello Torsten and Fred, So I looked at ithreads.pm (found it in an svn repository online http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestPerl/) and from what I saw, my approach was theoretically the same as in the test module except that the threads were created after the shared var