deprecated clear_stale_active_connections! can call #reap #5393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not sure about this, sending my question/suggestion in the form of a pull request. Only applies to master, so not an urgent matter, thanks @tenderlove.
The new #reap method accomplishes the same thing as the deprecated #clear_stale_active_connections! , although it uses other means to do it. At least #reap is documented to do the same thing -- remove connections associated with dead threads from the pool.
If you want to deprecate the old method name, that may be reasonable. But why not have it call the new #reap method instead of just no-op'ing? And why not have the deprecation warning suggest the new #reap method? Calling the #reap method instead of no-op'ing seems kinder to applications that are trying to use the deprecated behavior.
Alternately, seems like it would be better to remove the clear_stale_active_connections! method entirely, instead of leaving it as a no-op deprecated method. but personally, I like having it there, deprecated, but calling out to #reap, seems kindest to upgrading clients.