A
A
Alexey2016-02-27 23:42:28
PHP
Alexey, 2016-02-27 23:42:28

Limiting the number of multi Curl threads?

What are some ways to limit the number of threads created by multi curl? For example, I need to make requests for 500 urls, but I want only 10 threads to run at the same time?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Grigory Esin, 2016-02-27
@xotey83

Otkel there streams? Requests in curl multi are executed asynchronously and cooperatively, but on the same thread.
There is no multithreading in curl.

Y
Yuri, 2016-02-28
@riky

you will need to do multi curl for 10 requests and run in a loop 50 times, each time after the completion of all previous ones ... naturally minus - each iteration is the duration of the slowest request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question