Class MainLoopTaskToken

You can use the token to remove or replace the task.

Example
-- You can store the task token in a global variable and use it to acknowledge that the task is already registered.
if updateDataToken == nil then
    updateDataToken = MainLoopScheduler.prependTask(
        MainLoopStage.USER,
        "UpdateDataObjects",
        TaskRecurrence.Recurring,
        function()
            dataObjects.speed:setValue(currentSpeed)
        end
    )
end
Example
-- You can use the previously stored token to remove the task.
if updateDataToken ~= nil then
    MainLoopScheduler.removeTask(
        MainLoopStage.USER,
        updateDataToken
    )
    updateDataToken = nil
end