Closed SRWieZ closed 7 months ago
Dear contributor,
because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it.
Added a
memoryEfficient()
mode, whentrue
, it omit storing$this->results
and$this->finished
after processing tasks. I think this mode can be beneficial since in many case, we don't need to recheck out the result afterwards.Use case I used your package to compute a lot of calculation with large range of numbers. So big that I had to use a php generator. After setting the pool I used
htop
to look at memory usage and it was going up and up, until hitting memory limit (more than 5Go !) After my PR, the memory usage stay stable.Example usage
Side note: Should we throw an exception on getFinished() if memoryEfficient is set to true ?