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

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

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