Dave Mitchell wrote: > On Wed, Feb 27, 2008 at 08:15:36AM -0800, Dean Arnold wrote: >> As to shared object destruction: >> >> pre-5.10.0: once per thread, requires some extra bookkeeping to make sure >> it "does the right thing" >> >> 5.10.0: once in the last referencing thread (fixed in CORE) > > Huh? > > use warnings; > use strict; > > use threads; > use threads::shared; > > sub DESTROY { warn "DESTROY $_[0]\n" } > > my $h = bless {}; > share $h; > threads->new(sub {})->join; > > $ perl5100t /tmp/p > DESTROY main=HASH(0x98fb844) > DESTROY main=HASH(0x98748c4) > $ > > 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 ? Dean ArnoldThread Previous | Thread Next