Re: p5p summary: Improving threads::shared ?
[email protected] (Dean Arnold) Mon, 05 May 2008 12:42:48 -0700
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
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