Re: p5p summary: Improving threads::shared ?
[email protected] ("Jerry D. Hedden") Thu, 8 May 2008 10:12:49 -0400
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
> > It means that something like this would DWIM:
> >
> > my $x : shared;
> > $x = [ { 'complex' => 'aggregate' }, [ qw/ currently not sharable / ]
> ];
> >
> >
> > Then we just need a tie-in with the assignment operator. Or
> > perhaps we could just provide a function:
> >
> > $y = shared_clone($x);
> >
> >
>
> Would an assignment op overload work ?
> I.e., if the LHS was already shared(), then the = overload
> would do the deepcopy ? Or would that break the
> XS tie/magic side of the code ?
Oops. Shared variables aren't objects. So I don't think we
can use 'overload' on '='. Is that correct?