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 8, 2008 07:13
Subject:
Re: p5p summary: Improving threads::shared ?
Message ID:
1ff86f510805080712g77984908v843d03801db73262@mail.gmail.com
> > 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?

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