steinwurf / recycle

Simple resource pool for recycling resources in C++
BSD 3-Clause "New" or "Revised" License
63 stars 23 forks source link

Capacity and used_resources functionality #34

Closed Elukej closed 1 year ago

Elukej commented 1 year ago

This library has one of the best comments I've seen in open source community, so I did my best to comment everything very thoroughly. The allocaton_policy that I explained in discussion with @jpihl in the issue for this pull request is in LIMIT mode, so do check that discussion first before going into the code. Main features added are capacity setter and getter which are putting hard limit to how many resources can shared_pool accept. There is also a used_resources function which gets how many resources are currently used and tracked by the shared_pool.

Elukej commented 1 year ago

@jpihl , @loglund Please guys

jpihl commented 1 year ago

Hi @Elukej,

I appreciate your interest in the project and the effort you put into your contribution. After reviewing your changes, I don't think the setCapacity function fits with the project's current goals and use cases, so I don't plan to merge it into the library.

Please keep in mind that this decision isn't a reflection of the quality of your work, and I encourage you to keep contributing to open-source projects. Thank you for your understanding.