1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-26 20:34:40 +01:00

Merge pull request #9 from yched/pool_maxsize

Fix $maxSize being ignored in Pool constructor
This commit is contained in:
Stephen Coakley 2015-11-08 14:02:26 -06:00
commit 48ea5a2b42

View File

@ -75,7 +75,7 @@ class Pool implements PoolInterface
public function __construct($minSize = 0, $maxSize = 0, WorkerFactoryInterface $factory = null)
{
$minSize = $minSize ?: self::DEFAULT_MIN_SIZE;
$maxSize = $minSize ?: self::DEFAULT_MAX_SIZE;
$maxSize = $maxSize ?: self::DEFAULT_MAX_SIZE;
if (!is_int($minSize) || $minSize < 0) {
throw new InvalidArgumentError('Minimum size must be a non-negative integer.');