Skip to content

How to limit concurrency with async? #520

Closed Answered by SimonFrings
maximejobin asked this question in Q&A
Discussion options

You must be logged in to vote

@maximejobin good question 👍

I agree with what @WyriHaximus said, just note that when using clue/reactphp-mq you'll queue your (thousands) operations in-memory and I'm not sure if this is something you want to do (the more operations, the more memory you're using).

You might also want to take a look at clue/reactphp-flux as this works similar to clue/reactphp-mq without keeping you operations inside your memory, so this might be a good fit for the amount of operations you have. Taken from the flux documentation:

It uses ReactPHP's standard streaming interfaces which allow to process huge inputs without having to store everything in memory at once and instead allows you to efficiently pro…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SimonFrings
Comment options

Answer selected by maximejobin
@maximejobin
Comment options

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