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

Re: p5p summary: Improving threads::shared ?

Thread Previous | Thread Next
Jerry D. Hedden
May 5, 2008 08:34
Re: p5p summary: Improving threads::shared ?
Message ID:
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

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About