develooper Front page | perl.perl5.porters | Postings from January 2005

Re: Maintaining a pool of Perl interpreters

Thread Previous | Thread Next
Jeremy Redburn
January 7, 2005 10:55
Re: Maintaining a pool of Perl interpreters
Message ID:
Stas Bekman wrote:
> Jeremy Redburn wrote:
>> I am looking for an example of maintaining a persistent pool of Perl 
>> interpreters for use from my C program. I've looked through the 
>> mod_perl source code, but am a bit overwhelmed and as far as I can 
>> tell it seems to maintain a single interpreter per Apache process. If 
>> anyone has any advice or a pointer to examples, it will be greatly 
>> appreciated.
> modperl1 (which I suppose you've looked at), as it seems you have 
> realized, doesn't implement perl pools and the code is quite a mess.
> mod_perl 2 does implement perl interpreter pools and the code is very 
> clean and relatively clear (though could use more internal docs). Check 
> the modperl_interp.[ch] in src/modules/perl in the mp2 distro:
> Also see:

Alrighty, I've done some work towards implementing the pool of 
interpreters, based on the mod_perl work. The issue I've run into is 
that I'm not quite sure how to handle 'my_perl'. I used to have:

#define my_perl __interpreter

in my code when I had a single interpreter, but now with the pool of 
interpreters, I'm at a loss as to how to handle defining my_perl.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About