User:Cyanox

Using this as personal SandBox mostly ;)

Available since LÖVE 0.7.0
This type is not supported in earlier versions.

A Thread is a chunk of code that can run in parallel with other threads.

If a Lua error occurs in the thread, a message with the name "error" gets pushed to its message pool. Retrieve the message with Thread:get('error').

Constructors

love.thread.newThreadCreates a new Thread from a filename, string or FileData object containing Lua code.070

Functions

Object:releaseImmediately destroys the object's Lua reference.110
Object:typeGets the type of the object as a string.000
Object:typeOfChecks whether an object is of a certain type.000
Thread:demandReceive a message from a thread. Wait for the message to exist before returning.07090
Thread:getGet a value.08090
Thread:getErrorRetrieves the error string from the thread.090
Thread:getKeysReturns the names of all messages as a table.08090
Thread:getNameGet the name of a thread.07090
Thread:isRunningReturns whether the thread is currently running.090
Thread:killForcefully terminate the thread.07080
Thread:peekReceive a message from a thread, but leave it in the message box.07090
Thread:receiveReceive a message from a thread.07080
Thread:sendSend a message.07080
Thread:setSet a value.08090
Thread:startStarts the thread.070
Thread:waitWait for a thread to finish.070

Supertypes

See Also

Other Languages