Add connection_holder_class to Pool for custom connection handling#1251
Add connection_holder_class to Pool for custom connection handling#1251KorsaR-ZN wants to merge 1 commit into
Conversation
4a5d365 to
fbd1ef2
Compare
…agicStack#1251 Introduces a `connection_holder_class` parameter to the `Pool` class, enabling the use of custom classes for managing individual connections. This provides more flexibility for handling connection lifecycle, including acquisition and release logic, tailored to specific use cases.
fbd1ef2 to
daa3d96
Compare
Great, I also consider the current behavior to be a bug. In that case, I suggest we fix it as part of this PR — I'll update it a bit later to include the improved |
I would prefer if we separated the fix into a standalone PR.
|

This PR introduces the
connection_holder_classparameter to thePoolclass, enabling developers to plug in custom logic for managing individual connections — including acquisition, release, and lifecycle control. This added flexibility is particularly useful for advanced or non-standard use cases where the default connection handling may be insufficient.The change also lays the groundwork for addressing issue #989 by making it possible to implement custom connection management strategies tailored to specific requirements.