summaryrefslogtreecommitdiff
path: root/tests/sleep.php
blob: b3ea82357c4f8f22206b2879e25030221b81dd21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

declare(strict_types=1);

use Spiral\Goridge\StreamRelay;
use Spiral\RoadRunner\Worker as RoadRunner;

require dirname(__DIR__) . "/vendor_php/autoload.php";

$rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT));

while($rr->receive($ctx)){
    sleep(3);
    $rr->send("");
}