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

basic-queue

Package Overview
Dependencies
Maintainers
30
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-queue

a basic queue with concurrency

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
56
Maintainers
30
Weekly downloads
 
Created
Source

basic-queue

example

var Queue = require('basic-queue');
var q = new Queue(request, concurrency / numWorkers);

function request() {
    q.add();
}

api

q = Queue(callback, concurrency)

callback is the function that this queue runs. Concurrency is how many simultaneous jobs should run of that function. callback will receive object and callback as arguments. If callback is a call with an error as a first argument, the queue will emit an error event.

q.add()

Tell the queue to start a new job if it isn't over the concurrency limit.

Keywords

FAQs

Package last updated on 16 Jan 2015

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

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