Difference between revisions of "Coroutine.create"
From GiderosMobile
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| − | + | '''Available since:''' Gideros 2011.6<br/> | |
| − | ''' | + | '''Class:''' [[coroutine]]<br/> |
| − | ''' | ||
| − | === | + | === Description === |
| − | + | 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> | ||
| − | === | + | === Parameters === |
| − | '''f''': (function) | + | '''f''': (function) lua function<br/> |
| − | === | + | === Return values === |
| − | ''' | + | '''Returns''' (coroutine) created coroutine<br/> |
{{Coroutine}} | {{Coroutine}} | ||
Revision as of 22:30, 22 January 2023
Available since: Gideros 2011.6
Class: coroutine
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)
Parameters
f: (function) lua function
Return values
Returns (coroutine) created coroutine