Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hsldymq committed Apr 24, 2019
1 parent fabacd3 commit d3ec5cf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,7 @@ private function informWorkersQuit()

private function waitChildren()
{
$numWorkers = count($this->getWorkerIDs());
for ($i = 0; $i < $numWorkers; $i++) {
$pid = pcntl_wait($status, WNOHANG);
if ($pid <= 0) {
break;
}
while (($pid = pcntl_wait($status, WNOHANG)) > 0) {
$this->clearWorker($this->idMap[$pid] ?? '', $pid);
}
}
Expand Down

0 comments on commit d3ec5cf

Please sign in to comment.