Socket
Socket
Sign inDemoInstall

async-lock

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-lock - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

4

History.md

@@ -0,1 +1,5 @@

1.2.5
==================
* Allow `maxPending = 0` (thank you @bmrpatel)
* Upgrade dependencies

@@ -2,0 +6,0 @@ 1.2.4

4

lib/index.js

@@ -18,4 +18,4 @@ 'use strict';

this.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;
this.maxPending = opts.maxPending || AsyncLock.DEFAULT_MAX_PENDING;
this.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;
this.maxPending = Number.isInteger(opts.maxPending) && opts.maxPending >= 0 ? opts.maxPending : AsyncLock.DEFAULT_MAX_PENDING;
};

@@ -22,0 +22,0 @@

{
"name": "async-lock",
"description": "Lock on asynchronous code",
"version": "1.2.4",
"version": "1.2.5",
"author": {

@@ -43,3 +43,3 @@ "name": "Rogier Schouten",

"load-grunt-tasks": "^4.0.0",
"lodash": "^4.17.15",
"lodash": "^4.17.20",
"mocha": "^7.1.2",

@@ -46,0 +46,0 @@ "q": "^1.5.1",

@@ -34,3 +34,3 @@ # async-lock

The above code simply multiply a redis key by 2.
However, if two users run concurrency, the execution order may like this
However, if two users run concurrently, the execution order may like this
```

@@ -37,0 +37,0 @@ user1: redis.get('key') -> 1

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