For Programmers: Free Programming Magazines  


Home > Archive > ithreads > November 2007 > Re: [PATCH] Bug fix for storing shared objects in shared structures









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PATCH] Bug fix for storing shared objects in shared structures
Dean Arnold

2007-11-06, 7:34 pm

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com