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

importing blaze starts cpu_count() + 3 threads #1331

Closed
richafrank opened this issue Dec 1, 2015 · 1 comment
Closed

importing blaze starts cpu_count() + 3 threads #1331

richafrank opened this issue Dec 1, 2015 · 1 comment
Milestone

Comments

@richafrank
Copy link
Contributor

Not exactly a bug, but maybe an improvement request -

In debugging some context switching in our app, I was surprised to see a number of extra python Threads running. It turned out they are started by the import of blaze, because blaze/__init__.py imports blaze/utils.py, which instantiates a multiprocessing.ThreadPool at module scope. The pool starts 3 helper threads plus 1 thread per cpu.

I think this pool is only used by h5py. Is its creation something that could be made lazy, such that apps don't need to run the extra threads just to import blaze, especially if they don't compute with h5py?

@richafrank
Copy link
Contributor Author

Thanks!

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

No branches or pull requests

2 participants