-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Allow limiting the number of threads spawned for housekeeping and invalidation. #146
Comments
Thanks for raising the request. Exposing these configurations should be easy, so I will just do it. These thread pools are shared across all cache instances, so these limits will be cache-global configurations. Also, the thread pool library we use now does not support growing and shrinking the number of worker threads. So for now, they will be fixed numbers of worker threads, instead of limits (the maximum numbers of worker threads). One limitation is that you cannot change those numbers while cache instances exist. So you will set them before creating any cache. Just to clarify, this is how they work now (as of Moka v0.8.5):
|
Closing as complete.
v0.12.0 has major breaking changes. Please read the MIGRATION-GUIDE.md for details. |
Not sure how to express this (through the builder)? But for small resource use cases it would nice to limit the number of threads used.
The text was updated successfully, but these errors were encountered: