Executing functions in parallel

前端 未结 6 1659
情歌与酒
情歌与酒 2020-12-16 18:55

I have a function that needs to go over around 20K rows from an array, and apply an external script to each. This is a slow process, as PHP is waiting for the script to be e

6条回答
  •  萌比男神i
    2020-12-16 19:26

    If you'd like to execute parallel tasks in PHP, I would consider using Gearman. Another approach would be to use pcntl_fork(), but I'd prefer actual workers when it's task based.

提交回复
热议问题