Skip to content

CommonPool should be configurable to have a minimum number of threads #343

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

Closed
svd27 opened this issue Apr 21, 2018 · 2 comments
Closed

CommonPool should be configurable to have a minimum number of threads #343

svd27 opened this issue Apr 21, 2018 · 2 comments
Assignees

Comments

@svd27
Copy link

svd27 commented Apr 21, 2018

Currently CommonPool sets the number of threads in its pool to
max(NumberofCpus - 1,1)
this leads that on travis a lot of tests are failing for me. it would be nice to have something like a system property:
kotlinx.experimental.coroutines.commonpool.minThreads
which would allow to override that for unit tests

@fvasco
Copy link
Contributor

fvasco commented Apr 21, 2018

See #261

@qwwdfsad
Copy link
Collaborator

qwwdfsad commented Apr 22, 2018

For tests, it makes sense to provide separate pool and use it, you can see such pattern in our stress tests. CommonPool is a singleton, so changing its size via global system property may be error prone (especially for tests), so I would not recommend that.

Nevertheless, this is a valid issue (e.g. see #321), so we definitely will address it

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

No branches or pull requests

3 participants