Skip to main content

Interface: ThrottledTaskQueueHandler

A handler which defines the behavior of a ThrottledTaskQueueProcess.

Methods

canContinue

canContinue(elapsedFrameCount, dispatchedTaskCount, timeElapsed): boolean

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

NameTypeDescription
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.

Defined in

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


onAborted

onAborted(): void

This method is called when queue processing is aborted.

Returns

void

Defined in

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


onFinished

onFinished(elapsedFrameCount): void

This method is called when queue processing is finished.

Parameters

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

Returns

void

Defined in

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


onPaused

onPaused(elapsedFrameCount): void

This method is called when queue processing is paused.

Parameters

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

Returns

void

Defined in

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


onStarted

onStarted(): void

This method is called when queue processing is started.

Returns

void

Defined in

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