lovr.thread.newThread

Creates a new Thread from Lua code.

thread = lovr.thread.newThread(code)

Arguments

NameTypeDescription
codestringThe code to run in the Thread.

Returns

NameTypeDescription
threadThreadThe new Thread.

thread = lovr.thread.newThread(filename)

Arguments

NameTypeDescription
filenamestringA file containing code to run in the Thread.

Returns

NameTypeDescription
threadThreadThe new Thread.

thread = lovr.thread.newThread(blob)

Arguments

NameTypeDescription
blobBlobThe code to run in the Thread.

Returns

NameTypeDescription
threadThreadThe new Thread.

Notes

The Thread won't start running immediately. Use Thread:start to start it.

See also