Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightning-pool

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightning-pool - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

7

lib/Pool.js

@@ -41,2 +41,3 @@ /* lightning-pool

function Pool(factory, options) {
EventEmitter.apply(this);
if (typeof factory !== 'object')

@@ -348,3 +349,3 @@ throw new TypeError('`factory` object required');

tries++;
self._emitSafe('create-error', err,
self._emitSafe('error', err,
{

@@ -357,3 +358,3 @@ requestTime: request.created,

self._creating--;
return callback(err);
return callback && callback(err);
}

@@ -445,3 +446,3 @@ return setTimeout(function() {

if (self._allResources.size)
/* Check again 5 ms later */
/* Check again 5 ms later */
setTimeout(function() {

@@ -448,0 +449,0 @@ self._houseKeep();

{
"name": "lightning-pool",
"description": "Fastest object pool implementation for JavaScript",
"version": "1.0.2",
"version": "1.0.4",
"author": "Panates Ltd.",

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

@@ -207,3 +207,3 @@ # lightning-pool

- `max`: Maximum number of resources that `Pool` will create. (Default 10)
- `maxQueue`: Maximum number of request that `Pool` will acceps. (Default 1000)
- `maxQueue`: Maximum number of request that `Pool` will accept. (Default 1000)
- `resetOnReturn`: If true `Pool` will call `reset()` function of factory before moving it idle state. (Default true)

@@ -385,3 +385,3 @@ - `validation`: If true `Pool` will call `validation()` function of factory when it needs it. If false, `validation()` never been called. (Default true)

- `pending` (Number): Returns number of acquire request waits in the `Pool` queue.
- `size` (Number): Returns number total resources.
- `size` (Number): Returns number of total resources.
- `state` (PoolState): Returns current state of the `Pool`.

@@ -388,0 +388,0 @@ - `options` (PoolOptions): Returns object instance that holds configuration properties

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