##### Views

- Page
- Discussion
- View source
- History

# love.thread.newThread

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

- love.thread
- Thread

## 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

Retrieved from "https://www.love2d.org/wiki/love.thread.newThread"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties