-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Recycler to compliment Supplier #21
Comments
this brings up another good point, which is that if you don't have a |
Thanks for opening an issue. I love the idea of having a
However, I have one concern that will take some work to address. The This makes me wonder whether I should replace the Today's
would become
Whaddya think? |
This is currently handled by the |
I don't fully follow (and don't have time to dig in, sorry!). Also thanks, I missed the Your solution sounds good to me. If I follow, you could insert arbitrary types if you had a constructor that took the recycling function -- you wouldn't even need to implement the trait yourself! |
Supplier
is used to construct new instances, however the user may also want to control the maximum size allowed when items go back into the pool to avoid OOM.I recommend the name
Recycler
, although you can use whatever name you think is fitting.use case:
The text was updated successfully, but these errors were encountered: