Difference between revisions of "Thread"

Line 1: Line 1:
{{newin|[[0.7.0]]|type=type}}
+
{{newin|[[0.7.0]]|070|type=type}}
 
A Thread is a chunk of code that can run in parallel with other threads.
 
A Thread is a chunk of code that can run in parallel with other threads.
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Thread]]
+
{{#ask: [[Category:Functions]] [[Constructs::Thread]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 8: Line 8:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Thread]]
+
{{#ask: [[Category:Functions]] [[parent::Thread||Object]] [[Since::<071]]
| headers=hide
 
| ?Description
 
}}
 
{{#ask: [[Category:Functions]] [[parent::Object]]
 
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
Line 21: Line 17:
 
* [[parent::love.thread]]
 
* [[parent::love.thread]]
 
[[Category:Types]]
 
[[Category:Types]]
{{#set:Description=A Thread represents a thread.
+
{{#set:Description=A Thread represents a thread.}}
}}
 
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Thread}}
 
{{i18n|Thread}}

Revision as of 18:01, 25 March 2011

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.

Constructors

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

Functions

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.
Thread:getNameGet the name of a thread.
Thread:killForcefully terminate the thread.
Thread:peekReceive a message from a thread, but leave it in the message box.
Thread:receiveReceive a message from a thread.
Thread:sendSend a message.
Thread:startStarts the thread.
Thread:waitWait for a thread to finish.

Supertypes

Object

See Also

Other Languages