Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Cees-Jan Kiewiet:
Extending ReactPHP's Child Processes Part Two
Nov 29, 2017 @ 17:42:29

Continuing on from his first part of the series Cees-Jan Kiewiet has posted part two of his series covering the extension of ReactPHP's child processes.

react/child-process is very flexible and can work a lot of ways but sometimes you don't want to be bothered with the details of how it works and just want a simpler API to do that.

He mentions his wyrihaximus/react-child-process-pool package that makes working with the pool of processes easier and covers some of the "under the covers" handling behind it. He then shows an example of it in use, creating a pool that executes database queries via Doctrine's DBAL functionality to select the number of users from the users table. He then refactors it a bit using the wyrihaximus/react-child-process-closure functionality to make the child processing of a closure simpler.

tagged: reactphp child process series part2 tutorial

Link: https://blog.wyrihaximus.net/2017/11/extending-react-child-process-part-two/


Trending Topics: