develooper Front page | perl.ithreads | Postings from May 2008

Re: p5p summary: Improving threads::shared ?

Thread Previous | Thread Next
From:
Dean Arnold
Date:
May 5, 2008 12:42
Subject:
Re: p5p summary: Improving threads::shared ?
Message ID:
481F6338.3000105@presicient.com
Jerry D. Hedden wrote:
>>  Is this a logical approach?  If so, is it doable?
> 
> If circular references can't be fully supported in
> threads::shared, then I need to document this in its POD and
> in Thread::Queue's POD, too.  Do you agree?
> 

I don't know that they can't be "supported"; but they do
need to be explained. I also don't see how it effects
T::Q: since you always skip over anything thats already
shared, existing circular refs aren't an issue. Its only
detecting and creating new shared circular refs that
causes a problem, and thats fixed w/ the fieldhash lookup
(which is keyed on the private address, not the shared
version).

For any existing apps (eg, Data::Dumper) that want to
deal with it, they could always fallback to detecting something
as shared and saving its id (ie, the shared interpretter version's
address) to detect cycles. Not pretty, but effective.

- Dean

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About