Skip to content

Concurrency for Solo request #310

Answered by juse-less
jacksontong asked this question in Q&A
Discussion options

You must be logged in to vote

I believe it should be. At least in theory.
However, for true concurrency, you'd need to use the same HTTP client, to my knowledge.
At least from a cURL perspective (Guzzle default).
But I could be wrong here.

Nonetheless, from a SoloRequest perspective, I think it should be quite easy.
But you could try to instantiate your own Pool, providing a Connector for all SoloRequests to run with (to use the same HTTP client).
See the Pool class for constructor arguments.

Maybe something like the following (but untested):

$pool = new Pool(
    // Same connector that individual SoloRequests use.
    // So let's re-use a new one for all SoloReuqests, to utilise the same HTTP client.
    connector: new 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sammyjo20
Comment options

Answer selected by jacksontong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants