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 07:30
Subject:
Re: p5p summary: Improving threads::shared ?
Message ID:
481F1A03.3060100@presicient.com
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

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