2.0.2 • Published 6 years ago

pool-queue v2.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Hierarchy

PoolQueue

Index

Constructors

Methods


Constructors

constructor

new PoolQueue(concurrency: number): PoolQueue

Defined in index.ts:8

Parameters:

ParamType
concurrencynumber

Returns: PoolQueue


Methods

drain

drain(): Promise<void>

Defined in index.ts:38

Wait until the queue has no more work to complete.

Returns: Promise<void>


poll

poll(): Promise<void>

Defined in index.ts:31

Wait until the queue has at least one free worker.

Returns: Promise<void>


submit

submitT(work: function): Promise<T>

Defined in index.ts:18

Submit a task to be completed

Type parameters:

T

Parameters:

ParamType
workfunction

Returns: Promise<T> a Promise containing the completed work. While the task is executed concurrently, the returned Promise is fulfilled serially in the order it was submitted.


2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago