I was looking for a way to perform multi-threads on PHP and came across the pthreads PHP API, which I think could be easy to implement (however I'll have to find out how to install the PHP version with ZTS support for Debian).
The thing is that when I was looking at the pthreads php.net documentation I found this:
Tip Consider using parallel instead.
Which I didn't know about.
My goal is to get a list of items and for each one, open a websocket that listens for certain updates forever. So the thread should be there forever and if killed, or stopped, or so, it should be restarted (however I think I can handle this externally).
I'm not sure which one would be the most appropriate for this situation. Any recommendation?