2.0.2 • Published 7 years ago
pool-queue v2.0.2
Hierarchy
PoolQueue
Index
Constructors
Methods
Constructors
constructor
⊕ new PoolQueue(concurrency: number): PoolQueue
Defined in index.ts:8
Parameters:
| Param | Type |
|---|---|
| concurrency | number |
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:
| Param | Type |
|---|---|
| work | function |
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.