summaryrefslogtreecommitdiff
path: root/tests/pid.php
blob: bf10a025de898b3a912a3dce0c0ed133bd6a7d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
 /**
  * @var Goridge\RelayInterface $relay
  */

 use Spiral\Goridge;
 use Spiral\RoadRunner;

 $rr = new RoadRunner\Worker($relay);

 while ($in = $rr->receive($ctx)) {
     try {
         $rr->send((string)getmypid());
     } catch (\Throwable $e) {
         $rr->error((string)$e);
     }
 }