Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to use externally-created thread pool. #5

Merged
merged 1 commit into from Feb 19, 2015

Conversation

@jvoegele
Copy link
Contributor

jvoegele commented Feb 19, 2015

If you pass a Celluloid::PoolManager object to pmap, it will use that as its thread pool. If you pass no arguments or a numeric size, it will behave as it always has and create a new thread pool an each invocation.

The motivation for this change is that when pmap is called frequently, it ends up creating a new pool each time. When using a large thread pool size this led to exhaustion of resources and runtime exceptions.

If you pass a Celluloid::PoolManager object to pmap, it will use that as
its thread pool. If you pass no arguments or a numeric size, it will
behave as it always has and create a new thread pool an each invocation.
@jwo
Copy link
Owner

jwo commented Feb 19, 2015

I like 👍 and we are passing, sweet.

jwo added a commit that referenced this pull request Feb 19, 2015
Add ability to use externally-created thread pool.
@jwo jwo merged commit 9c672c5 into jwo:master Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.