-
Notifications
You must be signed in to change notification settings - Fork 576
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
Fix handling returned $promise from async method, closes #1990 #1991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i understand what this fixes. Head slightly hurts now tho. 🍻 needed to remedy this situation.
dc5d1e6
to
adffdee
Compare
Bad news, running my example from #1990 on this branch the example hangs. perl -Ilib -Mojo -MMojo::Base=-async_await -E 'async sub main { print await doit() } async sub doit { await Mojo::Promise->timer(1); return Mojo::Promise->resolve("hello") } main()->wait' |
adffdee
to
d383c68
Compare
The (second) latest force push was pretty bad. I wonder if we can add this patch?
@jberger: Either way, you can try again 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that fixes my example, thanks.
I also agree about that change to the github test runner, please open a PR for that too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
third time is the charm, clearly ;-)
Summary
Fix issue introduced in 166cedb when an async method returns a promise.
Motivation
@jberger reported the issue.
References
166cedb