Kraken\Util\Isolate\Isolate::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        if (($sockets = @stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP)) === false) {
            throw new InstantiationException('stream_socket_pair() could not establish connection.');
        }
        $pid = pcntl_fork();
        if ($pid == -1) {
            throw new InstantiationException('pcntl_fork() could not create subprocess.');
        } else {
            if ($pid) {
                $this->createParent($pid, $sockets);
            } else {
                $this->createChild($pid, $sockets);
            }
        }
    }