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

Apparent race condition with done and ultra-short Supply.interval #5593

Closed
p6rt opened this issue Aug 19, 2016 · 4 comments
Closed

Apparent race condition with done and ultra-short Supply.interval #5593

p6rt opened this issue Aug 19, 2016 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 19, 2016

Migrated from rt.perl.org#128991 (status was 'resolved')

Searchable as RT128991$

@p6rt
Copy link
Author

p6rt commented Aug 19, 2016

From @zoffixznet

This code produces the following exception with Rakudo dd5c28. If interval is changed to a larger
value, the issue does not occur​:

react {
  whenever Supply.interval(.001) {
  done if $++ > 1000;
  }
}
sleep 1;

Unhandled exception in code scheduled on thread 4
Access denied to keep/break this Promise; already vowed
  in any at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
  in sub THROW-NIL at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
  in block at test.p6 line 4

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

From @jnthn

On Fri, 19 Aug 2016 10​:06​:01 -0700, cpan@​zoffix.com wrote​:

This code produces the following exception with Rakudo dd5c28. If
interval is changed to a larger
value, the issue does not occur​:

react {
whenever Supply.interval(.001) {
done if $++ > 1000;
}
}
sleep 1;

Unhandled exception in code scheduled on thread 4
Access denied to keep/break this Promise; already vowed
in any at /home/zoffix/.rakudobrew/moar-
nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
in sub THROW-NIL at /home/zoffix/.rakudobrew/moar-
nom/install/share/perl6/runtime/CORE.setting.moarvm line 1
in block at test.p6 line 4

Fixed (the fix should prevent a whole class of similar problems rather than just this specific instance). Tests in S17-supply/syntax.t.

/jnthn

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 23, 2016
@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