Inheritance: implements Worker
Example #1
0
 public function __construct()
 {
     parent::__construct(new Fork(function () : \Generator {
         $runner = new TaskRunner($this, new BasicEnvironment());
         return yield from $runner->run();
     }));
 }
Example #2
0
 public function __construct()
 {
     $dir = dirname(dirname(__DIR__)) . '/bin';
     parent::__construct(new ChannelledProcess($dir . '/worker.php', $dir));
 }