I asked this question here in Stack Ooverflow:
What is the solution for asynchronous processes in PHP?
I did this because I wanted to, in the middle of a process execution, want to have a certain call of a function running on the other plane, without the need for script to wait for the end of the execution to be finalized.
Talking to a friend about the subject of "PHP has no asynchronism," I was worried that I was confusing the use of threads with asynchrony.
I have several questions on the subject:
-
There is a relationship between threads and these asynchronous calls / processing (which usually uses the keywords
await
orasync
), which exist in languages like C #, Python and NodeJS ? If they are different, what are they? -
What would a multithread be? Is it also related to asynchronous processing?
-
I understand it right or, in these languages, calling
await
orasync
causes the program to finish execution, while the function keeps running in the background, or in fact, asynchronism means that function will just not be executed in the code writing order (same thing happens in a definition of #
I'm asking this because for me, programming in PHP, it seemed to be all the same: p