tfoertsch has asked for the wisdom of the Perl Monks concerning the following question:
For example
if (r || c) { interp = modperl_interp_select(r, c, s); aTHX = interp->perl; } else { /* Child{Init,Exit}, OpenLogs */ aTHX = scfg->mip->parent->perl; PERL_SET_CONTEXT(aTHX); }
So, what does PERL_SET_CONTEXT do? Why is it called in the else branch but not in the if? Is that maybe an error?
When do I have to call PERL_SET_CONTEXT? Is it an expensive operation? Wouldn't it be right to call it each time an interpreter is selected for a certain task?
Thanks,
Torsten
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What is PERL_SET_CONTEXT for?
by kyle (Abbot) on Sep 26, 2007 at 16:48 UTC |