Skip Menu |
Report information
Id: 130796
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [CONC] Data races somewhere in SEQUENCE and/or continuation resuming code
Download (untitled) / with headers
text/plain 1.3k
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...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org