On 28-Feb-07, at 2:04 AM, Torsten Foertsch wrote:
Hi,the default interpreter scope is request. That means a certain interpreter islocked during the whole request cycle.
That's correct.
I use modperl mostly in thepre-response phases plus sometimes as an output filter. But I use pnotes to pass data between the phases. If I understand it correctly this forbids ahandler interpreter scope.
Yes, but you could use $r->notes() instead, as that's Perl agnostic, as long as what you need to pass around can be serialized as a string, you should be
okay.
Now I'd like to release the interpreter in mostcases just before the response phase. So it can be reused by another requestwhile the current request sends its data over a possibly slow network. Is that reasonable?
It's certainly not unreasonable ;-) If you know what you are doing, it should be perfectly fine to have a mechanism to release the current interpreter, and
in the worst-case scenario, it might just need to be re-acquired.
Is there something like $r->release_interp_after_this_phase()?
Nope, but writing one would be very simple, all that's needed is to call MpInterpPUTBACK_On(interp)
If not what is the right place to start looking/patching? And what pitfallsare there to watch out?
The tricky case will be what happens if you release the interpreter, but by some mistake, there is a handler that needs Perl again later during the request phase, you'd have to handle that gracefully somewhat. ------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
PGP.sig
Description: This is a digitally signed message part
