reactphp / reactphp

Event-driven, non-blocking I/O with PHP.

Home Page:https://reactphp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run a function in a child process

J7mbo opened this issue · comments

Is there a way I can run a function, or callable, in a child process, instead of just a command for an external script? I already have the code I want to execute available at runtime.

Well with react/child-process you can't do that directly. However I've created a package that lets you supply a class to do somewhat the same: https://github.com/WyriHaximus/reactphp-child-process-messenger#hassle-less-example

I believe this has been answered and I'm closing this for now, please feel free to come back to this ticket with more details if this problem persists and we can reopen this 👍