diff options
Diffstat (limited to 'tests/slow-pid.php')
-rw-r--r-- | tests/slow-pid.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/slow-pid.php b/tests/slow-pid.php new file mode 100644 index 00000000..daaf2583 --- /dev/null +++ b/tests/slow-pid.php @@ -0,0 +1,18 @@ +<?php + /** + * @var Goridge\RelayInterface $relay + */ + + use Spiral\Goridge; + use Spiral\RoadRunner; + + $rr = new RoadRunner\Worker($relay); + + while ($in = $rr->receive($ctx)) { + try { + sleep(1); + $rr->send((string)getmypid()); + } catch (\Throwable $e) { + $rr->error((string)$e); + } + }
\ No newline at end of file |