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

Projects
None yet
2 participants
@jvoegele
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.

Add ability to use externally-created thread pool.
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

This comment has been minimized.

Show comment
Hide comment
@jwo

jwo Feb 19, 2015

Owner

I like 👍 and we are passing, sweet.

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

Merge pull request #5 from jvoegele/feature/externally-created-pool
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