client os still waiting until the previous script finished
i noticed that . when i have a long running process then when i run a new script while the long running process is still running  . the last script will receive response once the long process script is done  

let say

function test(){
 $client->send("starting");
 while(true){ 
// long running
}
 $client->send(“done“);

}

expectation:  the message starting will receive by the client before the long running script will start its job and then afterwards it will receive the message done once the job is done

behavior: the client still wait for the long running script and then after the job is done . the word starting anf the word done were both receive in the same time . 


any thoughts?

edit:

o i just forgot the dollar sign