import Task from "../Task.js";
import { TaskSignal } from "../TaskSignal.js";

/**
 * Does nothing, useful when a task is required but no work is needed
 * @param {string} [name="no-operation"]
 * @returns {Task}
 */
export function emptyTask(name = "no-operation") {
    return new Task({
        name,
        cycleFunction: function () {
            return TaskSignal.EndSuccess;
        },
        computeProgress: function () {
            return 1;
        }
    });
}
