-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
5 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters