{{newin|[[0.7.0]]|070|type=function}}
Creates a new Thread from a filename, string or [[FileData]] object containing Lua code.

== 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 ==
{{newin|[[0.9.2]]|092|type=variant}}
=== Synopsis ===
<source lang="lua">
thread = love.thread.newThread( codestring )
</source>
=== Arguments ===
{{param|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 ===
{{param|Thread|thread|A new Thread that has yet to be started.}}

== Function==
{{oldin|[[0.9.0]]|090|type=variant}}
=== Synopsis ===
<source lang="lua">
thread = love.thread.newThread( name, filename )
</source>
=== Arguments ===
{{param|string|name|The name of the thread.}}
{{param|string|filename|The name of the File to use as source.}}
=== Returns ===
{{param|Thread|thread|A new Thread that has yet to be started.}}

== Function ==
{{oldin|[[0.9.0]]|090|type=variant}}
=== Synopsis ===
<source lang="lua">
thread = love.thread.newThread( name, file )
</source>
=== Arguments ===
{{param|string|name|The name of the thread.}}
{{param|File|file|The file to use as source.}}
=== Returns ===
{{param|Thread|thread|A new Thread that has yet to be started.}}

== Function ==
{{oldin|[[0.9.0]]|090|type=variant}}
=== Synopsis ===
<source lang="lua">
thread = love.thread.newThread( name, data )
</source>
=== Arguments ===
{{param|string|name|The name of the thread.}}
{{param|Data|data|The data to use as source.}}
=== Returns ===
{{param|Thread|thread|A new Thread that has yet to be started.}}

== See Also ==
* [[parent::love.thread]]
* [[Constructs::Thread]]
[[Category:Functions]]
{{#set:Description=Creates a new Thread from a filename, string or [[FileData]] object containing Lua code.}}
== Other Languages ==
{{i18n|love.thread.newThread}}