Difference between revisions of "Coroutine.create"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Creates a new coroutine, with body f. f must be a Lua function.
 
Creates a new coroutine, with body f. f must be a Lua function.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(thread) = coroutine.create(f)
 
(thread) = coroutine.create(f)
 
</source>
 
</source>

Revision as of 15:26, 13 July 2023

Available since: Gideros 2011.6
Class: coroutine

Description

Creates a new coroutine, with body f. f must be a Lua function. <syntaxhighlight lang="lua"> (thread) = coroutine.create(f) </source>

Parameters

f: (function) Lua function

Return values

Returns (thread) created coroutine