defer

fun <T : Task?> defer(@NonNull newDynamicTask: Supplier<T>): T

Call to add Task instances that will be executed sequentially during the active loop. This task will be internally wrapped into a DeferredTask, and added to the queue automatically.

Note: You do not need to call add on this task, it is called for you automatically.

Return

the added task

Parameters

newDynamicTask

deferred task to add to the run queue

<T>

the inherited task type


fun <T : Task?> defer(@NonNull runQueuePriority: AutonomousBunyipsOpMode.TaskPriority, @NonNull newDynamicTask: Supplier<T>): T

Add a task to the run queue at a specified run queue priority.

This task will be internally wrapped into a DeferredTask.

Note: You do not need to call add on this task, it is called for you automatically.

Return

the added task

Parameters

runQueuePriority

the run queue priority.

newDynamicTask

deferred task to add to the run queue

<T>

the inherited task type

See also