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

block-queue

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

block-queue

Nodejs in-process blocking FIFO queue implementation.

0.0.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

Nodejs Blocking Queue

Nodejs in-process blocking FIFO queue implementation.

npm install block-queue

Example

var queue = require('block-queue');

var q = queue(1, function(task, done) {
    // working on task..
    done();
});

q.push('task1');
q.push('task2');
q.push('task3');

See also: example-1.js and example-2.js.

API Ref

queue([cocurrency, ]reducer)

  • cocurrency, integer, optional, default: 1
  • reducer, function, required should be called with 2 parameters: task, done.

queue.push(task)

  • task, mixed, required.

queue.clear()

License

MIT.

Keywords

queue

FAQs

Package last updated on 21 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts