Skip to main content

Interface: ThrottledTaskQueueHandler

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:6

A handler which defines the behavior of a ThrottledTaskQueueProcess.

Methods

canContinue()

canContinue(elapsedFrameCount, dispatchedTaskCount, timeElapsed): boolean

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:21

Checks if queue processing can continue in the current frame. If this method returns false, queue processing will pause in the current frame and resume in the next frame via requestAnimationFrame().

Parameters

ParameterTypeDescription
elapsedFrameCountnumberThe number of frames elapsed since queue processing started. Equal to 0 on the first frame, 1 on the second, etc.
dispatchedTaskCountnumberThe number of tasks already dispatched in the current frame.
timeElapsednumberThe time elapsed so far in the current frame, in milliseconds.

Returns

boolean

whether queue processing can continue in the current frame.


onAborted()

onAborted(): void

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:40

This method is called when queue processing is aborted.

Returns

void


onFinished()

onFinished(elapsedFrameCount): void

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:35

This method is called when queue processing is finished.

Parameters

ParameterTypeDescription
elapsedFrameCountnumberThe number of frames elpased since queue processing started. Equal to 0 on the first frame, 1 on the second, etc.

Returns

void


onPaused()

onPaused(elapsedFrameCount): void

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:28

This method is called when queue processing is paused.

Parameters

ParameterTypeDescription
elapsedFrameCountnumberThe number of frames elapsed since queue processing started. Equal to 0 on the first frame, 1 on the second, etc.

Returns

void


onStarted()

onStarted(): void

Defined in: src/sdk/utils/task/ThrottledTaskQueueProcess.ts:10

This method is called when queue processing is started.

Returns

void