PIXI.AsyncQueue
private class AsyncQueue
Constructor
private new PIXI.AsyncQueue(worker: (x: TaskData, next: () => void) => void, concurrency: number) → {}
Name | Type | Default | Description |
---|---|---|---|
worker | (x: TaskData, next: () => void) => void | ||
concurrency | number | 1 |
Summary
Methods from AsyncQueue
Public Methods
static eachSeries(array: Array<unknown>, iterator: Function, callback: Function, deferNext: boolean) → {void}
Iterates an array in series.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
array | Array<unknown> |
Array to iterate. |
||
iterator | Function |
Function to call for each element. |
||
callback | Function |
<optional> |
Function to call when done, or on error. |
|
deferNext | boolean |
<optional> |
false |
Break synchronous each loop by calling next with a setTimeout of 1. |
Type | Description |
---|---|
void |
static queue(worker: Function, concurrency: number) → {unknown}
Async queue implementation,
Name | Type | Attributes | Description |
---|---|---|---|
worker | Function |
The worker function to call for each task. |
|
concurrency | number |
<optional> |
How many workers to run in parrallel. |
Type | Description |
---|---|
unknown |
The async queue object. |