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 2.0.0 to 2.0.1

2

lib/Pool.js

@@ -192,3 +192,3 @@ /* lightning-pool

const rinf = this._allResources.get(resource);
if (rinf && rinf.isAcquired)
if (rinf && !rinf.isIdle)
rinf.setIdle(callback);

@@ -195,0 +195,0 @@ } catch (e) {

@@ -31,14 +31,13 @@ /* lightning-pool

get isAcquired() {
return this.state === ResourceState.ACQUIRED || this.state ===
ResourceState.VALIDATION;
get isIdle() {
return this.state === ResourceState.IDLE;
}
setAcquired() {
if (this.isAcquired)
return;
this._detach();
this.state = ResourceState.ACQUIRED;
this.pool._acquiredResources.push(this);
this._acquiredNode = this.pool._acquiredResources.tail;
if (this.state !== ResourceState.ACQUIRED) {
this._detach();
this.state = ResourceState.ACQUIRED;
this.pool._acquiredResources.push(this);
this._acquiredNode = this.pool._acquiredResources.tail;
}
}

@@ -45,0 +44,0 @@

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

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

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