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
Type signature failures non-deterministically reported in start { ... } blocks #4305
Comments
From @hoelzroSee the attached script. The worker(Any, Int) sub is called from within a start block with only a single Any argument; I would expect this to either fail at compile time, throw an exception in the await'ing thread, or set the statuses of the Promises in @workers to a failed state. Instead, different behavior occurs across repeated execution non-deterministically, namely: - Sometimes await() never returns and just blocks forever. |
From @hoelzrouse v6; sub worker(Any $a, Int $b) {} my $value = Any; my @workers = (^2).map: { await @workers; |
From @jnthnOn Sat Jun 06 21:01:10 2015, rob@hoelz.ro wrote:
Changing the await line to: loop { Shows that sometimes the first Promise ends up Planned and second Broken, when both should be Broken. This explains the hang case. As for why, it golfs to this: my @log = [] xx 4; Which should always print four Trues, but instead can come out with some of them False. This means it's breaking the wrong Promise. Almost certainly an issue with how we compile CATCH. |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat Jun 06 21:01:10 2015, rob@hoelz.ro wrote:
This got fixed; it was a code-gen bug in the when/default stuff that is used inside of CATCH in the end. Just added a test, that seems to reliably pass, to S17-promise/start.t. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125346 (status was 'resolved')
Searchable as RT125346$
The text was updated successfully, but these errors were encountered: