develooper Front page | perl.perl5.porters | Postings from November 2013

[perl #119089] Shared references (threads::shared) disappear on sub return

Thread Previous | Thread Next
Tony Cook via RT
November 15, 2013 00:14
[perl #119089] Shared references (threads::shared) disappear on sub return
Message ID:
On Fri Oct 04 06:10:26 2013, dom wrote:
> Hmm, I can't see the subsequent question from Dave on this ticket. I'd 
> be interested in knowing about it even if there isn't an answer for it 
> yet, since this patch is queued for a Debian point release update in a 
> bid to fix the original regression. If there are sufficient remaining 
> uncertainties about the patch, it may be better to revert it before the 
> point release.

I think he meant:

I'm not sure about the correctness of the patch, but I think Dave's "why doesn't
this break" code example isn't correct, it should be:

  use threads ();
  use threads::shared;
  #use Devel::Peek;
  my $r;
      my @a :shared;
      $r = \$a[0];
      #Dump $r;
  $$r = 1; # changed this line

which does break.


via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About