Answer the question
In order to leave comments, you need to log in
Are there ready-made beautiful solutions, extensions or classes in yii2 for asynchronous operation of a function / method?
In a loop, a method is run with each iteration.
It is necessary that the method be executed asynchronously, and not after the completion of the previous one.
Answer the question
In order to leave comments, you need to log in
PHP as it is used to run a yii web application is a synchronous request response stream. To do things asynchronously, you can use one or another queue broker, such as rabbitMQ or the queue functionality from Redis. To work with the latter, yii has an official extension: https://github.com/yiisoft/yii2-queue
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question