diff --git a/src/ProcessPool.php b/src/ProcessPool.php index 2f07cec6..11697aee 100644 --- a/src/ProcessPool.php +++ b/src/ProcessPool.php @@ -293,7 +293,11 @@ public function processes() */ public function runningProcesses() { - return collect($this->processes)->filter(function ($process) { + $terminatingProcesses = $this->terminatingProcesses()->map(function ($process) { + return $process['process']; + }); + + return collect($this->processes)->concat($terminatingProcesses)->filter(function ($process) { return $process->process->isRunning(); }); }