lightning-pool
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -70,3 +70,2 @@ /* lightning-pool | ||
opts.maxQueue = options.maxQueue; | ||
opts.resetOnReturn = options.resetOnReturn; | ||
opts.validation = options.validation; | ||
@@ -73,0 +72,0 @@ |
@@ -12,4 +12,3 @@ export declare class PoolOptions { | ||
public maxQueue?: number; | ||
public resetOnReturn?: boolean; | ||
public validation?: boolean; | ||
} |
@@ -26,3 +26,2 @@ /* lightning-pool | ||
maxQueue: 1000, | ||
resetOnReturn: true, | ||
validation: true | ||
@@ -84,2 +83,3 @@ }; | ||
(val || defaultValues.idleTimeoutMillis); | ||
// noinspection JSAccessibilityCheck | ||
this.pool._setHouseKeep(); | ||
@@ -95,2 +95,3 @@ } | ||
(val || defaultValues.houseKeepInterval); | ||
// noinspection JSAccessibilityCheck | ||
this.pool._setHouseKeep(); | ||
@@ -108,2 +109,3 @@ } | ||
this._priv.max = this._priv.min; | ||
// noinspection JSAccessibilityCheck | ||
this.pool._setHouseKeep(); | ||
@@ -119,2 +121,3 @@ } | ||
(val || defaultValues.minIdle); | ||
// noinspection JSAccessibilityCheck | ||
this.pool._setHouseKeep(); | ||
@@ -132,2 +135,3 @@ } | ||
this._priv.min = this._priv.max; | ||
// noinspection JSAccessibilityCheck | ||
this.pool._setHouseKeep(); | ||
@@ -145,11 +149,2 @@ } | ||
get resetOnReturn() { | ||
return this._priv.resetOnReturn; | ||
} | ||
set resetOnReturn(val) { | ||
this._priv.resetOnReturn = val == null ? | ||
defaultValues.resetOnReturn : !!val; | ||
} | ||
get validation() { | ||
@@ -156,0 +151,0 @@ return this._priv.validation; |
@@ -62,7 +62,7 @@ /* lightning-pool | ||
callback && callback(); | ||
// noinspection JSAccessibilityCheck | ||
this.pool._acquireNext(); | ||
}; | ||
if (isAcquired && this.pool.options.resetOnReturn && | ||
this.pool._factory.reset) { | ||
if (isAcquired && this.pool._factory.reset) { | ||
const handleReset = (err) => { | ||
@@ -69,0 +69,0 @@ if (err) |
{ | ||
"name": "lightning-pool", | ||
"description": "Fastest object pool implementation for JavaScript", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37367
816