This commit is contained in:
as2252258@163.com
2021-03-20 03:35:44 +08:00
parent 3fbf782f41
commit 631c66874f
+17 -3
View File
@@ -35,12 +35,26 @@ class CrontabProcess extends Process
Coroutine\go(function () {
$this->waitGroup();
});
while (true) {
$this->channel->push($process->read());
}
$this->readByWorker($process);
}
/**
* @param $process
*/
private function readByWorker($process)
{
$this->channel->push($process->read());
Coroutine::sleep(0.01);
$this->readByWorker($process);
}
/**
* @throws \Exception
*/
private function waitGroup()
{
try {