Difference between revisions of "User:Cyanox"

Line 9: Line 9:
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
 +
| format=template
 
| template=CyaNoxTestingListThingy
 
| template=CyaNoxTestingListThingy
 
| ?Description
 
| ?Description
Line 17: Line 18:
 
{{#ask: [[Category:Functions]] [[parent::Thread||Object]] [[Concept:Current]]
 
{{#ask: [[Category:Functions]] [[parent::Thread||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
| format=template
 
| template=CyaNoxTestingListThingy
 
| template=CyaNoxTestingListThingy
 
| ?Description
 
| ?Description

Revision as of 05:05, 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

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|love.thread.newThread||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Creates a new Thread from a filename, string or FileData object containing Lua code.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

Functions

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Object:release||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Immediately destroys the object's Lua reference.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 11.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Object:type||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Gets the type of the object as a string.||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Object:typeOf||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Checks whether an object is of a certain type.||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:demand||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Receive a message from a thread. Wait for the message to exist before returning.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:get||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Get a value.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.8.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:getError||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Retrieves the error string from the thread.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.9.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:getKeys||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Returns the names of all messages as a table.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.8.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:getName||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Get the name of a thread.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:isRunning||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Returns whether the thread is currently running.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.9.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:kill||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Forcefully terminate the thread.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.8.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:peek||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Receive a message from a thread, but leave it in the message box.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:receive||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Receive a message from a thread.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.8.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:send||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Send a message.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.8.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:set||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Set a value.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.8.0 ||style="padding: 1px 5px 1px 5px; background-color: #fff8f8; vertical-align: top;"|Removed in 0.9.0 |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:start||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Starts the thread.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

|style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Thread:wait||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"|Wait for a thread to finish.||style="padding: 1px 5px 1px 5px; background-color: #f8fff8; vertical-align: top;"|Added since 0.7.0 ||style="padding: 1px 5px 1px 5px; background-color: #ffffff; vertical-align: top;"| |-

Supertypes

See Also

-- removed --

Other Languages

-- removed --