queue-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    191
    • latest
  • 0.1.1
    7
    • next

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    7
  • 0.1.0
    191

Package Sidebar

Install

npm i queue-ts

Weekly Downloads

169

Version

0.1.0

License

MIT

Last publish

Collaborators

  • knisterpeter