What are the expectations for a recycle implementation? #371
-
I'm unclear from the documentation and example what the expectations are for an implementation of Is a Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I somehow assumed that it's pretty self explanatory what it is expected to do and didn't put too much thought into writing more documentation for it.
The important bit missing here is...
The reset step is not a hard requirement. It might actually be the case that you know for sure that your code doesn't modify the objects. Performing a full cleanup can hurt performance. e.g. that's the reason why https://docs.rs/deadpool-postgres/latest/deadpool_postgres/enum.RecyclingMethod.html |
Beta Was this translation helpful? Give feedback.
I somehow assumed that it's pretty self explanatory what it is expected to do and didn't put too much thought into writing more documentation for it.
create
is used to create new objectsrecycle
is used to recycle existing objectsThe important bit missing here is...
The reset step is not a hard requirement. It might actually be the case that you know for sure that your code doesn't modify the objects. Performing a full cleanup can hurt performance. e.g. that's the reason why
dead…