Gisle Aas <[EMAIL PROTECTED]> writes: > >The thread key is not property of an interpreter. It is a single >global shared between all the threads running in the process space. >Same goes for PL_curinterp, it's a true global. The concept of having >different interpeters use different thread keys does not make sense.
It _could_ make sense. You could have an one interpreter per thread with OS key for thread-local data accessed via the thread_key. In such a scheme variable should obviously not be a true global but an intepreter one. PL_curinterp is a hack from our pre-threaded days and something needs to ensure that one thread owns it at a time. > >> Moreover if perl does get fixed, this modperl2 case is certainly going >> to crash, since it'll destroy the key but other parent interpreters >> sharing it will be still running. My test program demonstrates that >> quite clearly. > >Are you talking about my "perl_fini" patch as the fix here? The key >is not destroyed until the code is about to go (at dlclose time). If >other threads are still running they should segfault when the text >segment gets unmapped during dlclose, i.e. this can't happen. > >--Gisle --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]