lovr.task.resume

Edit

Resumes a task. This is similar to coroutine.resume, but integrates with the task scheduler:

This function returns once the task yields, either because it called an async function, called coroutine.yield, finished running, or errored.

success, ... = lovr.task.resume(...)

Arguments

NameTypeDescription
...* Arguments to pass to the task, as the return values from coroutine.yield. These are ignored if the task was waiting on an async call.

Returns

NameTypeDescription
successboolean Whether the task resumed and ran successfully.
...* An error message, or the results from coroutine.yield.

Notes

If the task is waiting on an async call, this function returns false, 'not ready'.

See also