The Wayback Machine - https://web.archive.org/web/20200605064122/https://github.com/mojolicious/mojo/issues/1172
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

Small introduction to promises #1172

Open
kraih opened this issue Dec 19, 2017 · 3 comments
Open

Small introduction to promises #1172

kraih opened this issue Dec 19, 2017 · 3 comments
Labels

Comments

@kraih
Copy link
Member

@kraih kraih commented Dec 19, 2017

This is very similar to #1119, there is no real documentation in Mojo::Promise. I think it would be nice to explain at the least the basics of how to use promises, their possible states, what returning promises in the ->then(...) callbacks means and so on.

@mavit
Copy link

@mavit mavit commented Jan 10, 2018

Somewhat related: http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Synchronizing-non-blocking-operations talks about promises having the possible states pending, fulfilled or rejected, but I was slightly confused not to find a way to check a promise for these states. I suspect I wouldn’t have wanted to try to do this in the first place, had I understood how best to use promises.

@lammel
Copy link
Contributor

@lammel lammel commented Apr 13, 2018

I'll try to provide a short introduction to promises with examples and open a pull request for further discussion soon.

@kraih
Copy link
Member Author

@kraih kraih commented May 27, 2018

I've started with the promise states. 8b3e17b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.