Socket
Socket
Sign inDemoInstall

queue-ts

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    queue-ts

A promise based worker queue with limited concurrency


Version published
Weekly downloads
91
decreased by-64.45%
Maintainers
1
Install size
10.1 kB
Created
Weekly downloads
 

Readme

Source

queue-ts

GitHub license Travis Coveralls branch David David npm Commitizen friendly

A promise based worker queue with limited concurrency.

Usage

// Create a queue with two worker threads
const queue = new Queue(2);
queue.onEmpty(() => {
  console.log('done');
});

// Adding tasks to do
queue.add(function task1() {});
queue.add(function task2() {});
queue.add(function task3() {});
queue.add(function task4() {});
queue.add(function task5() {});

The scheduled tasks will be executed but at most queue.concurrency task will be executed in parallel.

FAQs

Last updated on 16 Apr 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc