Difference between revisions of "love.thread.newThread"

m
m (Added new unnamed versions and oldins for the named versions)
Line 1: Line 1:
 
{{newin|[[0.7.0]]|070|type=function}}
 
{{newin|[[0.7.0]]|070|type=function}}
Creates a new Thread from a [[File]] or [[Data]] object.
+
Creates a new Thread from a Lua file or [[FileData]] object.
 +
 
 
== Function==
 
== Function==
 +
{{newin|[[0.9.0]]|090|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
thread = love.thread.newThread( filename )
 +
</source>
 +
=== Arguments ===
 +
{{param|string|filename|The name of the Lua file to use as the source.}}
 +
=== Returns ===
 +
{{param|Thread|thread|A new Thread that has yet to be started.}}
 +
 +
== Function ==
 +
{{newin|[[0.9.0]]|090|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
thread = love.thread.newThread( fileData )
 +
</source>
 +
=== Arguments ===
 +
{{param|FileData|fileData|The FileData containing the Lua code to use as the source.}}
 +
=== Returns ===
 +
{{param|Thread|thread|A new Thread that has yet to be started.}}
 +
 +
== Function==
 +
{{oldin|[[0.9.0]]|090|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 11: Line 35:
 
=== Returns ===
 
=== Returns ===
 
{{param|Thread|thread|A new Thread that has yet to be started.}}
 
{{param|Thread|thread|A new Thread that has yet to be started.}}
 +
 
== Function ==
 
== Function ==
 +
{{oldin|[[0.9.0]]|090|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 21: Line 47:
 
=== Returns ===
 
=== Returns ===
 
{{param|Thread|thread|A new Thread that has yet to be started.}}
 
{{param|Thread|thread|A new Thread that has yet to be started.}}
 +
 
== Function ==
 
== Function ==
 +
{{oldin|[[0.9.0]]|090|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 36: Line 64:
 
* [[Constructs::Thread]]
 
* [[Constructs::Thread]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Creates a new Thread from a [[File]] or [[Data]] object.}}
+
{{#set:Description=Creates a new Thread from a Lua file or [[FileData]] object.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.thread.newThread}}
 
{{i18n|love.thread.newThread}}

Revision as of 22:41, 11 August 2013

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

Creates a new Thread from a Lua file or FileData object.

Function

Available since LÖVE 0.9.0
This variant is not supported in earlier versions.

Synopsis

thread = love.thread.newThread( filename )

Arguments

string filename
The name of the Lua file to use as the source.

Returns

Thread thread
A new Thread that has yet to be started.

Function

Available since LÖVE 0.9.0
This variant is not supported in earlier versions.

Synopsis

thread = love.thread.newThread( fileData )

Arguments

FileData fileData
The FileData containing the Lua code to use as the source.

Returns

Thread thread
A new Thread that has yet to be started.

Function

Removed in LÖVE 0.9.0
This variant is not supported in that and later versions.

Synopsis

thread = love.thread.newThread( name, filename )

Arguments

string name
The name of the thread.
string filename
The name of the File to use as source.

Returns

Thread thread
A new Thread that has yet to be started.

Function

Removed in LÖVE 0.9.0
This variant is not supported in that and later versions.

Synopsis

thread = love.thread.newThread( name, file )

Arguments

string name
The name of the thread.
File file
The file to use as source.

Returns

Thread thread
A new Thread that has yet to be started.

Function

Removed in LÖVE 0.9.0
This variant is not supported in that and later versions.

Synopsis

thread = love.thread.newThread( name, data )

Arguments

string name
The name of the thread.
Data data
The data to use as source.

Returns

Thread thread
A new Thread that has yet to be started.

See Also

Other Languages