Re: p5p summary: Improving threads::shared ?
[email protected] (Dean Arnold) Mon, 05 May 2008 07:30:27 -0700
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
Jerry D. Hedden wrote: > > What are your thoughts regarding structures that mix shared > and non-shared elements? Should a whole separate clone be > made, or should that shared portions (i.e., refs) be used in > the copy? (I'm thinking the latter, while messier, makes > more sense.) > I agree. That most closely matches perl_clone behavior, ie., preserving shared variables between threads. I don't know that its messier, but it will certainly need to be documented. BTW: have you looked into reusing or integrating with any of the Clone modules ? At present, I don't think they handle shared variables, but they're the usual mechanism for cloning structures, and a couple of them use XS for performance. - Dean