Stas Bekman <[EMAIL PROTECTED]> writes:
I've played with it some more. The following program demonstrates some So again perl doesn't provide enough public API to properly juggle perl interpreters.
I disagree. The API seems fine to me.
No.
1) There is a bug in perl_alloc. As my program (see my previous post in this thread) demostrates, perl_alloc will not allocate a private key for a new interpreter (which is proper for perl_clone'd perls, but broken for a different perl running in the same interpreter.
2) PERL_SET_CONTEXT has a problem with using the PL_thr_key key, which may belong to a totally different interpreter.
Suggestions?
Don't mess with PL_curintep or FREE_THREAD_KEY. These are internal to perl and this problem should be fixed inside perl. Assignments to PL_curinterp or killing the thread key can't be made thread safe without cooperation with perl itself.
If you need a workaround until this is fixed in perl just link in the destructor I provided in mod_perl itself.
I don't try to mess with anything. All I try to do is to provide a workaround for users of older perls. As you can see from my previous posts the workaround that you suggest does not work if there is more than one parent perl as things segfault.
And in any case I didn't see perl fixed and it's not quite clear whether it's going to be fixed at all.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]