addFirst

fun <T : Task?> addFirst(@NonNull newTask: T): T

Add a task to the very start of the queue. This is useful to call when working with tasks that should be queued at the very start of the autonomous, while still being able to add tasks asynchronously with user input in onReady.

Return

the added task

Parameters

newTask

task to add to the run queue

<T>

the inherited task type