Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data races somewhere in SEQUENCE and/or continuation resuming code #6083

Open
p6rt opened this issue Feb 16, 2017 · 1 comment
Open

Data races somewhere in SEQUENCE and/or continuation resuming code #6083

p6rt opened this issue Feb 16, 2017 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 16, 2017

Migrated from rt.perl.org#130796 (status was 'new')

Searchable as RT130796$

@p6rt
Copy link
Author

p6rt commented Feb 16, 2017

From @zoffixznet

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...

@p6rt p6rt added the conc label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant