Difference between revisions of "love.thread.newThread"
(Added information about how löve distinguishes strings whether they are a filename or code.) |
(Can be created from a string too) |
||
Line 1: | Line 1: | ||
{{newin|[[0.7.0]]|070|type=function}} | {{newin|[[0.7.0]]|070|type=function}} | ||
− | Creates a new Thread from a | + | Creates a new Thread from a filename, string or [[FileData]] object containing Lua code. |
== Function== | == Function== |
Revision as of 15:47, 14 January 2019
Available since LÖVE 0.7.0 |
This function is not supported in earlier versions. |
Creates a new Thread from a filename, string or FileData object containing Lua code.
Contents
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
Available since LÖVE 0.9.2 |
This variant is not supported in earlier versions. |
Synopsis
thread = love.thread.newThread( codestring )
Arguments
string codestring
- A string containing the Lua code to use as the source. It needs to either be at least 1024 characters long, or contain at least one newline.
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
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
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
Returns
Thread thread
- A new Thread that has yet to be started.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info