You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.
Unless there's a compelling reason to throw when a developer calls client.release more than once, I'd prefer to see client.release mutate itself into a noop the first time it's called - that would be better for developer ergonomics.
Related question: Is there an easy way to determine whether a client has already been released (easier than wrapping client.release() in a try...catch block and ignoring the exception)?
The text was updated successfully, but these errors were encountered:
a compelling reason to throw when a developer calls client.release more than once
It’s a mistake and hiding mistakes is bad.
Related question: Is there an easy way to determine whether a client has already been released (easier than wrapping client.release() in a try...catch block and ignoring the exception)?
No, because the pool might return the same client again, as the same object. (It should probably be changed so it returns wrapped clients instead of direct client objects in the next major.)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Unless there's a compelling reason to throw when a developer calls
client.release
more than once, I'd prefer to seeclient.release
mutate itself into anoop
the first time it's called - that would be better for developer ergonomics.Related question: Is there an easy way to determine whether a client has already been released (easier than wrapping
client.release()
in atry...catch
block and ignoring the exception)?The text was updated successfully, but these errors were encountered: