See perlembed (GIYF):
Note the calls to PERL_SET_CONTEXT(). These are necessary to initialize the global state that tracks which interpreter is the "current" one on the particular process or thread that may be running it. It should always be used if you have more than one interpreter and are making perl API calls on both interpreters in an interleaved fashion.PERL_SET_CONTEXT(interp) should also be called whenever interp is used by a thread that did not create it (using either perl_alloc(), or the more esoteric perl_clone()).
In this case, it looks to me as if PERL_SET_CONTEXT is being used because the interpreter is being used by a thread that didn't create it.
In reply to Re: What is PERL_SET_CONTEXT for?
by kyle
in thread What is PERL_SET_CONTEXT for?
by tfoertsch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |