Forker A PHP helper to fork processes and allow multi-threading

Getting Started

Usage

Adapters

Adapters - Interface

View the API Documentation for this class

The actual execution of code is handled by adapters. The library ships with 2 by default (PCNTL and Single Thread).

You can create your own adapter by implementing the AdapterInterface and injecting it into the Fork instance:

$fork = new Fork(new MyCustomAdapter);

There are three important things to keep in mind when building a custom adapter: