Parallel processing in PHP - How do you do it?

后端 未结 8 2142
礼貌的吻别
礼貌的吻别 2020-12-01 00:00

I am currently trying to implement a job queue in php. The queue will then be processed as a batch job and should be able to process some jobs in parallel.

I already

8条回答
  •  粉色の甜心
    2020-12-01 00:31

    i use exec(). Its easy and clean. You basically need to build a thread manager, and thread scripts, that will do what you need.

    I dont like fsockopen() because it will open a server connection, that will build up and may hit the apache's connection limit

    I dont like curl functions for the same reason

    I dont like pnctl because it needs the pnctl extension available, and you have to keep track of parent/child relations.

    never played with gearman...

提交回复
热议问题