-
Notifications
You must be signed in to change notification settings - Fork 66
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
Forward compatibility with upcoming Promise v3 #157
Conversation
f3115ab
to
a5619ea
Compare
I've updated this to show that this is currently only blocked by reactphp/promise#229. The gist is that we resolve a number of promises in the same tick and its internal queue mechanism would use a different execution order for Promise v3 only. This is now addressed upstream for Promise v3 as this is the only version that shows this problem. As an alternative, I've also looked into addressing this in this component instead, but I believe the logic to be fine and the previous Promise v3 behavior to be counter-intuitive. The code in question looks good to me and suggests outstanding promises should be rejected before the final Lines 163 to 181 in 7b4428d
As such, I believe addressing this in reactphp/promise#229 is the best way moving forward. The resulting patch looks surprisingly straight-forward, but together with the referenced tickets you're looking at several days worth of work on investigating this root cause and coming up with this minimal solution. Enjoy! |
Updated now that reactphp/promise#229 has been merged, this now only depends on reactphp/socket#214. The first commit updates this to the currently unreleased Socket component to show how this only depends on reactphp/socket#214 (the build should be green). The second commit updates this to the releases that have yet to be tagged. This is expected to fail at the moment and should be green once the releases are tagged and the build is restarted. |
Restarted build now that Socket v1.12.0 has been released, this is now ready for review |
Builds on top of reactphp/promise#213, reactphp/promise#138, reactphp/promise#224, reactphp/socket#214 and reactphp/promise-stream#20, reactphp/promise-timer#54 and clue/reactphp-block#61
Refs clue/reactphp-http-proxy#44