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

sync-queues

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sync-queues - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

9

lib/index.js

@@ -59,3 +59,3 @@ "use strict";

}
var poll = function () {
var dispatchNextTask = function () {
if (!running) {

@@ -76,5 +76,3 @@ var release = queue.shift();

queue.push(turn.releaser);
if (queue.length > 0) {
poll();
}
dispatchNextTask();
return [4 /*yield*/, turn.promise];

@@ -94,3 +92,2 @@ case 1:

result = _a.sent();
;
return [2 /*return*/, result];

@@ -103,3 +100,3 @@ case 4:

}
poll();
dispatchNextTask();
return [7 /*endfinally*/];

@@ -106,0 +103,0 @@ case 5: return [2 /*return*/];

{
"name": "sync-queues",
"version": "1.0.2",
"version": "1.0.3",
"description": "Utility for synchronizing async code",

@@ -17,6 +17,6 @@ "main": "lib/index.js",

"@types/jest": "24.0.11",
"jest": "24.5.0",
"ts-jest": "24.0.0",
"typescript": "3.3.4000"
"jest": "24.8.0",
"ts-jest": "24.0.2",
"typescript": "3.5.1"
}
}

@@ -18,3 +18,3 @@ export const noop = () => {};

let running = false;
let timeoutId: NodeJS.Timeout | null = null;
let timeoutId: ReturnType<typeof setTimeout> | null = null;
if (taskTimeout < 0) { throw taskTimeoutValueError; }

@@ -43,3 +43,3 @@

});
const result = await Promise.race([task(), timeout]);;
const result = await Promise.race<T>([task(), timeout]);
return result;

@@ -46,0 +46,0 @@ } finally {

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