Difference between revisions of "User:Cyanox"

Line 36: Line 36:
 
== Other Languages ==
 
== Other Languages ==
 
-- removed --
 
-- removed --
 +
 +
== Functions ==
 +
{{#ask: [[Category:Functions]] [[parent::Thread||Object]] [[Concept:Current]]
 +
| headers=hide
 +
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 +
}}

Revision as of 06:42, 29 March 2013

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.newThread Creates a new Thread from a filename, string or FileData object containing Lua code. Added since 0.7.0

Functions

Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
Thread:demand Receive a message from a thread. Wait for the message to exist before returning. Added since 0.7.0 Removed in 0.9.0
Thread:get Get a value. Added since 0.8.0 Removed in 0.9.0
Thread:getError Retrieves the error string from the thread. Added since 0.9.0
Thread:getKeys Returns the names of all messages as a table. Added since 0.8.0 Removed in 0.9.0
Thread:getName Get the name of a thread. Added since 0.7.0 Removed in 0.9.0
Thread:isRunning Returns whether the thread is currently running. Added since 0.9.0
Thread:kill Forcefully terminate the thread. Added since 0.7.0 Removed in 0.8.0
Thread:peek Receive a message from a thread, but leave it in the message box. Added since 0.7.0 Removed in 0.9.0
Thread:receive Receive a message from a thread. Added since 0.7.0 Removed in 0.8.0
Thread:send Send a message. Added since 0.7.0 Removed in 0.8.0
Thread:set Set a value. Added since 0.8.0 Removed in 0.9.0
Thread:start Starts the thread. Added since 0.7.0
Thread:wait Wait for a thread to finish. Added since 0.7.0

Supertypes

See Also

-- removed --

Other Languages

-- removed --

Functions

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