Socket
Socket
Sign inDemoInstall

generic-pool

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generic-pool - npm Package Compare versions

Comparing version 3.0.0-alpha to 3.0.0-alpha.1

14

lib/Pool.js

@@ -63,2 +63,4 @@ 'use strict'

* Should the pool start creating resources etc once the constructor is called
* @param {Promise} [config.Promise=Promise]
* What promise implementation should the pool use, defaults to native promises.
*/

@@ -100,2 +102,4 @@ constructor (factory, config) {

this._Promise = (typeof _config.Promise === 'object') ? _config.Promise : poolDefaults.Promise
this._factory = factory

@@ -446,3 +450,3 @@ this._draining = false

if (this._draining) {
return Promise.reject(new Error('pool is draining and cannot accept work'))
return this._Promise.reject(new Error('pool is draining and cannot accept work'))
}

@@ -452,3 +456,3 @@

if (this._config.maxWaitingClients !== undefined && this._waitingClientsQueue.length >= this._config.maxWaitingClients) {
return Promise.reject(new Error('max waitingClients count exceeded'))
return this._Promise.reject(new Error('max waitingClients count exceeded'))
}

@@ -542,3 +546,3 @@

}
return Promise.resolve()
return this._Promise.resolve()
}

@@ -552,3 +556,3 @@

})
return Promise.all(ps)
return this._Promise.all(ps)
}

@@ -571,3 +575,3 @@

this._availableObjects.forEach(this._destroy, this)
return Promise.all(this._factoryDestroyOperations)
return this._Promise.all(this._factoryDestroyOperations)
}

@@ -574,0 +578,0 @@

@@ -26,2 +26,4 @@ 'use strict'

this.max = null
// FIXME: this seems odd?
this.Promise = Promise
}

@@ -28,0 +30,0 @@ }

{
"name": "generic-pool",
"description": "Generic resource pooling for Node.JS",
"version": "3.0.0-alpha",
"version": "3.0.0-alpha.1",
"author": "James Cooper <james@bitmechanic.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -135,2 +135,3 @@ [![build status](https://secure.travis-ci.org/coopernurse/node-pool.png)](http://travis-ci.org/coopernurse/node-pool)

- `autostart`: boolean, should the pool start creating resources etc once the constructor is called, (default true)
- `Promise`: Promise lib, a Promises/A+ implementation that the pool should use. Defaults to whatever `global.Promise` is (usually native promises).

@@ -137,0 +138,0 @@ ### pool.acquire

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc