Thread

Edit

A Thread is an object that runs a chunk of Lua code in the background. Threads are completely isolated from other threads, meaning they have their own Lua context and can't access the variables and functions of other threads. Communication between threads is limited and is accomplished by using Channel objects.

To get require to work properly, add require 'lovr.filesystem' to the thread code.

Constructor

lovr.thread.newThreadCreate a new Thread.

Methods

Thread:getErrorGet the Thread's error message.
Thread:isRunningCheck if the Thread is running.
Thread:startStart the Thread.
Thread:waitWait for the Thread to complete.

See also