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

Re: p5p summary: Improving threads::shared ?

Thread Previous | Thread Next
From:
Jerry D. Hedden
Date:
May 5, 2008 08:34
Subject:
Re: p5p summary: Improving threads::shared ?
Message ID:
1ff86f510805050834x359760feq74b0cee986eab869@mail.gmail.com
Dean Arnold wrote:
>  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.

I'm not familiar with any of them.  However, if they don't
handled shared variables, I'm not sure they'd be useful
unless they were modified to do make shared copies at each
step.

As a first step, I'll work on fixing the circular references
issue in Thread::Queue.  (I think I have it done, but need
to test it.)  Then work on moving that code to
threads::shared in conjunction with overloading the '='
operator.  After that, I could look into other modules
and/or further optimizations.

I've attached my reworked version of T::Q that I think takes
care of circular references.  Would you mind giving it a
going over?  (It passes all the currents tests in its test
suite, so I know I didn't break anything.)  Thanks.

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