D
D
Dmitry Skogorev2015-11-28 14:28:22
PHP
Dmitry Skogorev, 2015-11-28 14:28:22

asynchronous queue in php

Good day. There is a curved parser for specific tasks, curl_multi is used and a batch of url lists are fed to it.
the remote side sometimes slows down and I have to wait for completion for the whole pack
; I see a crutch implementation with workers - give each url to a third-party script and wait until it responds, but I don’t know how correct this is and how to control execution. maybe there are ready-made examples?
that is, having three urls
with a long answer from, say, the first one and with 2 and 3 completed, start accessing 4 and 5, and after the first one answers, start picking up the sixth one.
sorry for the confusion, in short, I'm looking for a ready-made class or a sane description of how to write multithreading with a queue
thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Melekhovets, 2015-11-28
@Blast

have to wait for completion for the whole pack

https://github.com/chuyskywalker/rolling-curl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question