Socket
Socket
Sign inDemoInstall

generic-pool

Package Overview
Dependencies
Maintainers
3
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.7.2 to 3.7.8

20

lib/Pool.js

@@ -628,2 +628,22 @@ "use strict";

/**
* Waits until the pool is ready.
* We define ready by checking if the current resource number is at least
* the minimum number defined.
* @returns {Promise} that resolves when the minimum number is ready.
*/
ready() {
return new this._Promise(resolve => {
const isReady = () => {
if (this.available >= this.min) {
resolve();
} else {
setTimeout(isReady, 100);
}
};
isReady();
});
}
/**
* How many resources are available to allocated

@@ -630,0 +650,0 @@ * (includes resources that have not been tested and may faul validation)

2

package.json
{
"name": "generic-pool",
"description": "Generic resource pooling for Node.JS",
"version": "3.7.2",
"version": "3.7.8",
"author": "James Cooper <james@bitmechanic.com>",

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

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

### pool.ready
```js
pool.ready()
```
Waits for the pool to fully start.
### pool.use

@@ -237,0 +245,0 @@

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