Skip to content

Properly instantiate LazyPromise #121

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

Merged
merged 1 commit into from
Jun 4, 2018
Merged

Properly instantiate LazyPromise #121

merged 1 commit into from
Jun 4, 2018

Conversation

holtkamp
Copy link

@holtkamp holtkamp commented Jun 1, 2018

No description provided.

@WyriHaximus WyriHaximus requested review from jsor, WyriHaximus and clue June 1, 2018 13:25
@holtkamp
Copy link
Author

holtkamp commented Jun 1, 2018

And while we are at it? Maybe a more (concrete) real life example on how to use this? Tried to understand the example and tried to use it, but I find it hard to understand...

Context: I try to use lazy Promises in a Queue to reduce the amount of used / allocated memory...

@clue clue added this to the v2.6.0 milestone Jun 2, 2018
@jsor
Copy link
Member

jsor commented Jun 4, 2018

@holtkamp The LazyPromise is just a wrapper around a callback which produces the "real" promise only once then() is called on the LazyPromise. Since almost in all cases, then() is called immediately, it doesn't provide a real benefit and thus we decided to remove in for v3.0 (#98).

@jsor jsor merged commit 5c777af into reactphp:2.x Jun 4, 2018
@holtkamp
Copy link
Author

holtkamp commented Jun 4, 2018

@jsor thanks for the explanation!

@holtkamp holtkamp deleted the patch-1 branch June 4, 2018 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants