On Fri, Feb 29, 2008 at 07:38:48PM -0500, Jerry D. Hedden wrote: > Dean Arnold wrote: > > Hmmm, it looks like the PL_destroyhook change in CORE > > made it into 5.10.0, but the version of threads::shared > > that uses it didn't. It looks like the CPAN version has > > it...or am I missing something else ? > > That's exactly correct. You need 5.10.0 + threads::shared from CPAN.
Ah, PL_destroyhook had completely passed me by. I've just had a look at the bleed version of threads::shared, and there appears to be a destroyhook race condition: If both threads try to free a shared object (RC=2) around the same time, they both call Perl_shared_object_destroy, both conclude they shouldn't call DESTROY since RC > 1, and thus the object is freed with no-one calling the destructor. -- The Enterprise's efficient long-range scanners detect a temporal vortex distortion in good time, allowing it to be safely avoided via a minor course correction. -- Things That Never Happen in "Star Trek" #21