# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #130796]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130796 >


IRC conversation: https://irclog.perlgeek.de/perl6-dev/2017-02-16#i_14113164

Key excerpts:

13:44   IOninja         m: my $c = 0; my @a = 1, {rand} ... *; my @b = 1, 
{rand} ... *; for ^10 -> $i { await start { $ = @a[^$i] }, start { $ = @b[^$i] 
}}; say @a[^10] eqv @b[^10]; say $c; say @a[^10]
13:44   camelia         rakudo-moar a62882: OUTPUT«True␤0␤((Any) (Any) (Any) 
(Any) (Any) (Any) (Any) (Any) (Any) (Any))␤»
13:45   IOninja         I don't get why this happens...
13:47           I'm awaiting both promises on each iteration and they each 
touch separate arrays with separate seqs

And

13:52   jnthn   m: my $c = 0; my @a = lazy gather { take 1; loop { take rand } 
}; my @b = lazy gather { take 1; loop { take rand } }; for ^10 -> $i { await 
start { $ = @a[^$i] }, start { $ = @b[^$i] } }; say @a[^10] eqv @b[^10]; say 
$c; say @a[^10]
13:52   camelia         rakudo-moar 8f53a6: OUTPUT«False␤0␤(1 0.517685008703888 
0.406042977439581 0.0789016444057807 0.825124610951737 0.238677816060427 
0.328078729529237 0.284027643066457 0.404746614724066 0.752322767245437)␤»
13:52   jnthn   That works, for example
13:54   IOninja         Seems less busted, but still got it to produce "This 
continuation has already been invoked" twice:  
https://gist.github.com/zoffixznet​/8bcc916ef3e683b8e6cd879a75ab4282
13:56           gonna ticket it
13:58   jnthn   Ah, then maybe that is where it is...

Reply via email to