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

OSX await not waiting for Planned promise #4457

Closed
p6rt opened this issue Aug 5, 2015 · 7 comments
Closed

OSX await not waiting for Planned promise #4457

p6rt opened this issue Aug 5, 2015 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 5, 2015

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

Searchable as RT125758$

@p6rt
Copy link
Author

p6rt commented Aug 5, 2015

From @ugexe

I seem to have hit a strange bug on osx where for​:
`await $promise; say $promise.perl`
shows $promise as planned (its not waiting).

If i do​:
`$promise.result; await $promise; say $promise.perl`
it shows the promise as Kept after properly awaiting.

I am not able to golf down an example, however this code snippet may clarify​:
https://gist.github.com/ugexe/ab6ca0453900cc0c746d

Inside the .then() in the gist above the `await` works fine. `$p` gets returned ($promise = $p). Then comes the originally mentioned `await $promise; say $promise.perl` which shows Planned. The .then() chain is then being executed (instead of executed during the `await $promise`). If I do `$promise.result; await $promise; say $promise.perl` it shows `Kept` and executes the .then() chain during the `await`

@p6rt
Copy link
Author

p6rt commented Aug 5, 2015

From @ugexe

I should mention regarding the gist above​:
$promise = $.start-processes

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @ugexe

Attached is a stand alone example of this bug.

It (along with example output on Linux and OSX) can also be seen here​:
https://gist.github.com/ugexe/a3c1efc1c3c6d4f42fdc

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @ugexe

rt125758.pl6

@p6rt
Copy link
Author

p6rt commented Aug 10, 2016

From @jnthn

On Wed Aug 05 11​:45​:14 2015, ugexe@​cpan.org wrote​:

I seem to have hit a strange bug on osx where for​:
`await $promise; say $promise.perl`
shows $promise as planned (its not waiting).

If i do​:
`$promise.result; await $promise; say $promise.perl`
it shows the promise as Kept after properly awaiting.

This was fixed a while back in Rakudo commit 1ee27e660a8. Given there are numerous Promise-using tests in the test suite that would have occasionally failed due to this bug, I think we can consider it sufficiently covered also.

/jnthn

@p6rt
Copy link
Author

p6rt commented Aug 10, 2016

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

@p6rt
Copy link
Author

p6rt commented Aug 10, 2016

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

@p6rt p6rt closed this as completed Aug 10, 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