Jerry D. Hedden wrote:
The attached patches fix this bug. Thank to Dean Arnold for the suggestion to use a PL_ function pointer.
Just to double check: does this permit *any* blessed, tied SV to make use of this feature (assuming it's tie module chains the PL_destroyhook) ? Or only threads::shared ? Or only if ithreads is configured ? My read of the code indicates it does, which means I can borrow it for Thread::Sociable...and perhaps DBI (which has blessed, tied hashes) might as well ? Which also reminds me of another threads::shared issue: any chance of threads::shared chaining the lockhook and destroyhook (ie, saving the current funcptr before assigning to it, then checking the SV is shared when its hook functions get called, and forwarding on if the SV isn't shared ? (I've been meaning to put together a patch for this). It may not be needed if CORE always sets up threads::shared 1st, but just in case some other module wants to hook in, and we don't know the hooking order beforehand, it might be useful. (Note this doesn't require CORE changes, just threads::shared changes) Dean Arnold