Answer the question
In order to leave comments, you need to log in
How to read a file asynchronously?
Hello habr users.
As you know in php multi-threading (threads) is not very well developed, therefore the script should work in single-threaded mode and any long task should not stop its execution.
I want to be able to do 3 things at the same time:
Answer the question
In order to leave comments, you need to log in
Create a task and go on executing the code while the task is being solved - this is about promises.
There are no built-in promises in php, but you can add their support yourself manually:
https://habr.com/ru/company/skyeng/blog/453296/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question