When creating a task from Ashita's ashita.tasks. addon functions, the actual created task/coroutine is not returned. It would be ideal to return the object so that users can easier control the coroutine (when applicable) such as killing it from outside the function.
For example:
local co = ashita.tasks.once(1, function ()
-- do stuff here..
end);
co:kill(); -- Kill the coroutine, similar to coroutine.kill() from within the task function.
Or allow coroutine,kill() to accept an optional parameter of an existing coroutine/task.
Addon / Plugin Description
When creating a task from Ashita's
ashita.tasks.
addon functions, the actual created task/coroutine is not returned. It would be ideal to return the object so that users can easier control the coroutine (when applicable) such as killing it from outside the function.For example:
Or allow coroutine,kill() to accept an optional parameter of an existing coroutine/task.