coopernurse / node-pool

Generic resource pooling for node.js
2.37k stars 258 forks source link

Allow unlimited maximum #264

Open radarfox opened 5 years ago

radarfox commented 5 years ago

Is there any reason why the pool size can't be unlimited? The default is 1 and setting to Infinity causes pool.fill to fail with:

Error: Maximum count of objects exceeded.

I'm using the pool for it's "recyclation features" rather than for limiting the count of objects. My current hotfix is setting max to Number.MAX_SAFE_INTEGER.