New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-worker-pool

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-worker-pool - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

2

package.json
{
"name": "node-worker-pool",
"version": "2.1.1",
"version": "2.1.2",
"dependencies": {

@@ -5,0 +5,0 @@ "q": "~0.9.7"

@@ -18,3 +18,2 @@ "use strict";

this._allPendingResponses = [];
this._pendingMessageToAllWorkers = Q();
this._queuedMessages = [];

@@ -109,26 +108,20 @@ this._queuedWorkerSpecificMessages = {};

this._pendingMessageToAllWorkers =
this._pendingMessageToAllWorkers.then(function() {
// Queue the message up for all currently busy workers
var busyWorkerResponses = [];
for (var workerID in this._workerPendingResponses) {
var deferred = Q.defer();
this._queuedWorkerSpecificMessages[workerID] = {
deferred: deferred,
msg: msg
};
busyWorkerResponses.push(deferred.promise);
}
// Queue the message up for all currently busy workers
var busyWorkerResponses = [];
for (var workerID in this._workerPendingResponses) {
var deferred = Q.defer();
this._queuedWorkerSpecificMessages[workerID] = {
deferred: deferred,
msg: msg
};
busyWorkerResponses.push(deferred.promise);
}
// Send out the message to all workers that aren't currently busy
var availableWorkerResponses =
this._availableWorkers.map(function(workerID) {
return this._sendMessageToWorker(workerID, msg);
}, this);
this._availableWorkers = [];
// Send out the message to all workers that aren't currently busy
var availableWorkerResponses = this._availableWorkers.map(function(workerID) {
return this._sendMessageToWorker(workerID, msg);
}, this);
this._availableWorkers = [];
return Q.all(availableWorkerResponses.concat(busyWorkerResponses));
}.bind(this));
return this._pendingMessageToAllWorkers;
return Q.all(availableWorkerResponses.concat(busyWorkerResponses));
};

@@ -135,0 +128,0 @@

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