-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
start-buckets!
creates more threads than necessary
#29
Comments
Hi, Thanks for reporting this, I will try to think of another way of doing this. Idea: Have a lock for adding/mutating buckets that must be also acquired for starting them |
@oliyh Great! FYI, we've been workaround with this fix. |
Hi, Thanks for sharing your workaround. Just reading through it, here's what I see:
This means that adding a bucket dynamically is not really possible anymore - in fact the code still has So I don't think I can use your solution as it is, but it has given me some ideas thank you. |
Hi, I've pushed Cheers |
start-buckets!
is usingswap!
to update bucket information, andswap!
must have no side effects. 1superlifter/src/superlifter/core.cljc
Lines 194 to 200 in eb89a40
And this situation can easily be happening where the server is under heavy load.
This results in creating many unnecessary threads, hogging the thread pool.
Footnotes
https://clojuredocs.org/clojure.core/swap! - Note that f may be called multiple times, and thus should be free of side effects. ↩
The text was updated successfully, but these errors were encountered: