Difference between revisions of "Coroutine.create"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object...")
 
Line 4: Line 4:
 
Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".
 
Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".
 
<source lang="lua">
 
<source lang="lua">
(coroutine), = coroutine.create(f,)
+
(coroutine) = coroutine.create(f)
 
</source>
 
</source>
'''f:''' (function) lua function ''''''<br/>
+
'''f''': (function) lua function ''''''<br/>
 
'''Returns''' (coroutine) created coroutine<br/>
 
'''Returns''' (coroutine) created coroutine<br/>

Revision as of 10:16, 23 August 2018

Available since: Gideros 2011.6

Description

Creates a new coroutine, with body f. f must be a Lua function. Returns this new coroutine, an object with type "thread".

(coroutine) = coroutine.create(f)

'f: (function) lua function '
Returns (coroutine) created coroutine