lovr.task.start

Edit

Starts a new task. This creates a new coroutine and resumes it with lovr.task.resume:

local task = coroutine.create(f)
task:resume(...)
return task
task = lovr.task.start(f, ...)

Arguments

NameTypeDescription
ffunction The function used for the coroutine body.
...* Arguments to pass to the task.

Returns

NameTypeDescription
taskthread The new task.

See also