public function getFinishedJobs()
    {
        while (count($this->jobs) !== 0) {
            foreach ($this->jobs as $index => $job) {
                if ($job->isFinished()) {
                    unset($this->jobs[$index]);
                    yield $index => $job;
                }
            }
        }
    }
public function getFinishedJobs()
    {
        while (count($this->jobs) !== 0) {
            foreach ($this->jobs as $index => $job) {
                if ($job->isFinished()) {
                    unset($this->jobs[$index]);
                    yield $index => $job;
                }
            }
        }
    }
public function getFinishedJobs ( ) { while ( count ( $ this -> jobs ) !== 0 ) { foreach ( $ this -> jobs as $ index => $ job ) { if ( $ job -> isFinished ( ) ) { unset ( $ this -> jobs [ $ index ] ) ; yield $ index => $ job ; } } } }
Yields jobs as they finish
@return \Generator
Yields jobs as they finish