-
Notifications
You must be signed in to change notification settings - Fork 299
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
Make use of Guzzle Pool to improve efficiency #401
Conversation
Thanks @Gugu7264 for the PR and your help on the other issues.
|
It's indeed added as a separate function because of the breaking change behavior of using a callback instead if returning/yielding something. Apart from that, I do not think there's any advantage. |
@Minishlink Here are 2 commits that should fix 2. and 3. I haven't done community PHP development before and wasn't aware of the tests set up in composer, hence the failing (I was missing a comma...). |
As for this, I added this as separate since I don't know when will next version come, but I can change it for the next breaking version? (maybe there should be a separate branch for the breaking version?) |
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.
Let's make this a non breaking change for the moment since it changes some things like error handling etc
Can you update the readme please? In the "how do I scale" section, add a line for flushPooled
Here's a fixed version @Minishlink |
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.
Thank you!
Fixes #367, fixes #195.
Since making use of the
Pool
refrains from returning anything to the user, acallback
argument is added in the newflushPooled
function, which will get called for each response received.It was mentioned in #367 to transform the
prepare
method into a Generator, but that's not possible if we want to be able to return the Request alongside the Response.