coopernurse / node-pool

Generic resource pooling for node.js
2.38k stars 259 forks source link

Make Pool a class, put methods on prototype #114

Closed felixfbecker closed 8 years ago

felixfbecker commented 8 years ago

Closes #111

I made Pool and PriorityQueue a proper class, all variables are now private properties and all methods sit on the prototype. I also adapted the README to show the usage with new Pool() as the recommended use, but calling it without new is still supported.

Unfortunately, I could not run the tests because of the ancient expresso. I will therefor just open this PR and see what Travis CI says.

felixfbecker commented 8 years ago

var self = this is driving me nuts

felixfbecker commented 8 years ago

Finally, after exactly 7 interactive rebases and Travis builds. I hate Node 0.2.