mirror of
https://github.com/danog/parallel.git
synced 2024-11-27 04:44:56 +01:00
Merge pull request #9 from yched/pool_maxsize
Fix $maxSize being ignored in Pool constructor
This commit is contained in:
commit
48ea5a2b42
@ -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.');
|
||||
|
Loading…
Reference in New Issue
Block a user