pool icon indicating copy to clipboard operation
pool copied to clipboard

Added createPoolWithMaxReuseCount

Open junjihashimoto opened this issue 10 years ago • 3 comments

Add max reuse count for createPool. When reuse count reaches maxReuseCount, reaper destroys the resource. It is usefull to avoid resource leak.

junjihashimoto avatar Apr 02 '15 09:04 junjihashimoto

Hi,

If you have time, could you see this? I would appreciate it if I could receive a comment from you. How do you think this patch?

junjihashimoto avatar Apr 27 '15 03:04 junjihashimoto

Hi, I was looking for a pool that would close resources after they have been used a certain number of times. This is useful when your resources grow larger as they are being used (with or without any memory leaks). I would look forward to seeing such functionality being available in a mainstream pool package.

plaprade avatar Jul 26 '15 13:07 plaprade

@junjihashimoto @plaprade if you are still interested, I'd be able to merge this PR into my fork that already includes other PRs from this main repository: one, two, three. But I'd have to ask your help to rebase your branch on the latest master branch of my fork.

avanov avatar Dec 14 '21 18:12 avanov