Difference between revisions of "Thread.new"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2018.10<br/> '''<translate>Class</translate>:''' Thread<br/> === <translat...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' 2018.10<br/>
'''<translate>Available since</translate>:''' 2018.10<br/>
+
'''Class:''' [[Thread]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Thread|Thread]]<br/>
 
  
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Creates a new thread object. This manages one real hardware thread which you can set Lua functions to be run inside.
+
Creates a new ''Thread'' object. This manages one real hardware thread which you can set Lua functions to be run inside.
</translate><br/>
+
<syntaxhighlight lang="lua">
<source lang="lua">local thread = Thread.new()</source>
+
local thread = Thread.new()
 +
</syntaxhighlight>
  
=== <translate>Parameters</translate> ===
+
=== Return values ===
''<translate>none</translate>''<br/>
+
'''thread: ''' ''(Thread)'' new Thread object<br/>
=== <translate>Return values</translate> ===
+
 
'''thread: ''' ''(Thread)'' <translate>new Thread object</translate><br/>
+
{{Thread}}

Latest revision as of 15:33, 13 July 2023

Available since: 2018.10
Class: Thread

Description

Creates a new Thread object. This manages one real hardware thread which you can set Lua functions to be run inside.

local thread = Thread.new()

Return values

thread: (Thread) new Thread object