Difference between revisions of "Coroutine.status"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Returns the status of `coroutine` co, as a string: "running", if the coroutine is running (that is, it...") |
|||
Line 4: | Line 4: | ||
Returns the status of `coroutine` co, as a string: "running", if the coroutine is running (that is, it called status); "suspended", if the coroutine is suspended in a call to yield, or if it has not started running yet; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if the coroutine has finished its body function, or if it has stopped with an error. | Returns the status of `coroutine` co, as a string: "running", if the coroutine is running (that is, it called status); "suspended", if the coroutine is suspended in a call to yield, or if it has not started running yet; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if the coroutine has finished its body function, or if it has stopped with an error. | ||
<source lang="lua"> | <source lang="lua"> | ||
− | (string) | + | (string) = coroutine.status(co) |
</source> | </source> | ||
− | '''co | + | '''co''': (coroutine) coroutine to check status for ''''''<br/> |
'''Returns''' (string) the state of coroutine<br/> | '''Returns''' (string) the state of coroutine<br/> |
Revision as of 10:18, 23 August 2018
Available since: Gideros 2011.6
Description
Returns the status of `coroutine` co, as a string: "running", if the coroutine is running (that is, it called status); "suspended", if the coroutine is suspended in a call to yield, or if it has not started running yet; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if the coroutine has finished its body function, or if it has stopped with an error.
(string) = coroutine.status(co)
'co: (coroutine) coroutine to check status for '
Returns (string) the state of coroutine