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
Fixes#212
This adds `Pool::add`, which allows for externally created
connections to be added and managed by the pool. If the pool
is at maximum capacity when this method is called, it will
return the input connection as part of the Err response.
I considered allowing `Pool:add` to ignore `max_size` when
adding to the pool, but felt it could lead to confusion if
the pool is allowed to exceed its capacity in this specific
case.
This change required making PoolInternals::approvals visible
within the crate to get the approval needed to add a new
connection. The alternative would have required defining a
new pub(crate) method for this specific use case, which feels
worse. I'm open to suggestions on how to more cleanly integrate
this change into the package.
0 commit comments