FivePD API
Interfaces

ITickQueueService

Handles invocation on a tick by tick basis. Useful for calling natives on a background thread when we don't necessarily need an immediate result.

Methods

EnqueueAsync

Pushes an action to the tick queue, and requests that the system runs a tick for the current resource ASAP.

Parameters

NameTypeDescription
actionActionAn action to execute and complete upon execution.

Returns

NameType
TaskA task which completes upon execution.

EnqueueAsync

See EnqueueAsync.

Parameters

NameTypeDescription
actionFunc<T>An action to execute and complete upon execution.

Returns

NameType
Task<T>A task which completes upon execution.

EnqueueInterval

Pushes an action to the tick queue which will be invoked at the given interval.

Parameters

NameTypeDescription
actionActionAn action to execute and complete upon execution.
intervalInMsintThe interval to run the action in milliseconds.

Returns

NameType
GuidThe enqueued task's ID.

EnqueueInterval

Pushes an action to the tick queue which will be invoked at the given interval.

Parameters

NameTypeDescription
actionFunc<Task>An action to execute and complete upon execution.
intervalInMsintThe interval to run the action in milliseconds.

Returns

NameType
GuidThe enqueued task's ID.

DequeueInterval

Dequeues an interval task.

Parameters

NameTypeDescription
guidGuidThe ID of the task.