On Tue, 11 Jan 2005, Stas Bekman wrote: > So each parent interpeter should be totally independent from other > parent interpreters. I'm not sure if sharing the key is possible. > Since you will end up with two threads from totally different pools > using the same thread key. Or is it just fine?
This is not only fine, it is exactly as is should be: the thread key is just a pointer to a thread local storage slot, which is an *index* into the local stack. So while the index is the same for each thread, the actual memory location it points to in each thread is different. This means that Perl can find the current Perl interpreter by looking it up at a fixed offset in the thread's stack. This obviously only works if the offset (thread key) is the same for each interpreter. Cheers, -Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]