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

task-queue

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

task-queue - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

11

index.js

@@ -10,3 +10,3 @@ /**

_opts.concurrency = this._opts.concurrency | 1;
_opts.concurrency = _opts.concurrency | 1;

@@ -18,8 +18,10 @@ var _exec = function() {

var popped = _array.pop();
if (popped)
if (popped) {
setImmediate(function () {
popped.method.apply(popped.context | null, popped.args | null);
popped.method.apply(popped.context != undefined ? popped.context : null,
popped.args != undefined ? popped.args : null);
actual_concurrency--;
if (actual_concurrency == 0) _exec();
});
}
}

@@ -34,5 +36,6 @@ }

push: function(fn, opts){ // support fn(args) arguments
var task = opts | {};
var task = opts != undefined ? opts : {};
task.method = fn;
_array.push(task);
console.log(task);
_exec();

@@ -39,0 +42,0 @@ },

{
"author" : "Roberto Sales <robertosalesc@dcc.ufba.br>",
"name": "task-queue",
"version": "0.0.5",
"version": "0.0.6",
"description": "async single worker tasks queue that supports concurrency, priority and provide simple interface for passing task arguments",

@@ -6,0 +6,0 @@ "keywords": ["task", "queue", "worker", "concurrency", "async", "priority"],

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