Skip to content

Conversation

@TechAlchemistry
Copy link
Contributor

No description provided.

@TechAlchemistry
Copy link
Contributor Author

TechAlchemistry commented May 19, 2017

Hi! Why do not you merge this PR?

@TechAlchemistry TechAlchemistry changed the title removed the undocumented lower limit of pool size removed the lower limit of pool size May 19, 2017
@TechAlchemistry
Copy link
Contributor Author

... ?

@qxsch
Copy link
Owner

qxsch commented Sep 16, 2017

Sorry for my late response, but a workerpool schould have at least one worker. So removing the whole if, introduces a potential bug.
We could consider, changing the value from 2 to 1.

@TechAlchemistry
Copy link
Contributor Author

TechAlchemistry commented Sep 16, 2017

@qxsch But the setWorkerPoolSize method already has a lower limit check.

       public function setWorkerPoolSize($size) {
		if ($this->created) {
			throw new WorkerPoolException('Cannot set the Worker Pool Size for a created pool.');
		}
		$size = (int)$size;
		if ($size <= 0) {
			throw new \InvalidArgumentException('"' . $size . '" is not an integer greater than 0.');
		}
		$this->workerPoolSize = $size;
		return $this;
	}

@qxsch qxsch merged commit 060fc54 into qxsch:master Sep 16, 2017
@TechAlchemistry
Copy link
Contributor Author

Thank you!

@qxsch
Copy link
Owner

qxsch commented Sep 16, 2017

You're welcome! Sorry again for my late response and thank you for your contribution.

@TechAlchemistry
Copy link
Contributor Author

TechAlchemistry commented Sep 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants