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

Re: p5p summary: Improving threads::shared ?

Thread Previous | Thread Next
Dean Arnold
May 5, 2008 07:30
Re: p5p summary: Improving threads::shared ?
Message ID:
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

- Dean

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About