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
Name | Type | Description |
---|---|---|
elapsedFrameCount | number | The number of frames elapsed since queue processing started. Equal to 0 on the first frame, 1 on the second, etc. |
dispatchedTaskCount | number | The number of tasks already dispatched in the current frame. |
timeElapsed | number | The 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
Name | Type | Description |
---|---|---|
elapsedFrameCount | number | The 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
Name | Type | Description |
---|---|---|
elapsedFrameCount | number | The 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