/** * Passing any type of variable to the thread constructor * It will be copied to the child process * @param ForkableLoopInterface $loop * @param resource $stream */ public function __construct(ForkableLoopInterface $loop, $stream) { if (is_resource($stream) === false) { throw new InvalidArgumentException("Stream has to be a valid resource"); } parent::__construct($loop); $this->stream = $stream; }
public function __construct(ForkableLoopInterface $loop) { parent::__construct($loop); }