Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

17
vendor/swoole/examples/process/close.php vendored Executable file
View File

@ -0,0 +1,17 @@
<?php
$process = new swoole_process(function (swoole_process $worker)
{
echo "Worker: start. PID=" . $worker->pid . "\n";
sleep(2);
$worker->close(swoole_process::PIPE_READ);
$worker->write("hello master\n");
$worker->exit(0);
}, false);
$pid = $process->start();
$r = array($process);
$w = array();
$e = array();
$ret = swoole_select($r, $w, $e, 1.0);
var_dump($ret);
var_dump($process->read());