PIXI.AsyncQueue

private class AsyncQueue

Constructor


private new PIXI.AsyncQueue(worker: (x: TaskData, next: () => void) => void, concurrency: number) → {}
Parameters:
Name Type Default Description
worker (x: TaskData, next: () => void) => void
concurrency number 1

Public Methods


eachSeries AsyncQueue.ts:252
static eachSeries(array: Array<unknown>, iterator: Function, callback: Function, deferNext: boolean) → {void}

Iterates an array in series.

Parameters:
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.

Returns:
Type Description
void
queue AsyncQueue.ts:293
static queue(worker: Function, concurrency: number) → {unknown}

Async queue implementation,

Parameters:
Name Type Attributes Description
worker Function

The worker function to call for each task.

concurrency number

<optional>

How many workers to run in parrallel.

Returns:
Type Description
unknown

The async queue object.


Powered by webdoc!