Coroutine

From GiderosMobile
Revision as of 08:57, 23 August 2018 by Hgy29 (talk | contribs)

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description

Suspends the execution of the calling coroutine. The coroutine cannot be running a C function, a metamethod, or an iterator. Any arguments to yield are passed as extra results to resume.






Methods

coroutine.create - creates coroutine from function f, returns coroutine
coroutine.resume - continues execution of co, returns bool status plus any values
coroutine.status - returns co status: "running", "suspended" or "dead"
coroutine.wrap - creates coroutine with body f, returns function that resumes co
coroutine.yield - suspend execution of calling coroutine

Events

Constants