6.0.4 • Published 3 years ago

promise-priority-queue v6.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Promise Priority Queue

A promisified bucket priority queue written in Typescript with no external dependencies.

Requirements

  • node >= 5.0

Installation

npm i -S promise-priority-queue

Usage

import PromiseQueue from 'promise-priority-queue';

const concurrency = 10;
const queue = new PromiseQueue({ concurrency /** optional */ });
const priority = 1;
const task = async (): number => {
  // do work
  return 1;
};

const result: number = await queue.addTask( priority, task ); // resolves with the task result

API

Documentation is available here

Deep link to the PromiseQueue class

6.0.4

3 years ago

5.1.0

3 years ago

6.0.0

3 years ago

6.0.3

3 years ago

5.0.1

3 years ago

4.0.0

3 years ago

5.0.0

3 years ago

3.0.0

3 years ago

1.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago