Difference between revisions of "Coroutine.status"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
(Remove example that doesn’t show anything interesting on its own, improve description, and use type template) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|name=coroutine.status | |name=coroutine.status | ||
+ | |args={{Type|coroutine}} coro | ||
|api=Coroutine | |api=Coroutine | ||
− | |returns= | + | |returns={{Type|string}} status |
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Returns the status of | + | |desc=Returns the status of <var>coro</var>. This is one of “running”, if the coroutine is running; “suspended”, if the coroutine has not yet been started or it called [[coroutine.yield]] and has not yet been resumed; “normal”, if the coroutine called [[coroutine.resume]] and that call has not yet returned (equivalently, if <var>coro</var> is an ancestor of the currently executing coroutine); or “dead”, if its function returned. |
− | |examples= | + | |examples=Please see [[Coroutine (API)]] for a worked example of using all the coroutine functions. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Latest revision as of 18:24, 22 April 2013
Function coroutine.status | |
Returns the status of coro. This is one of “running”, if the coroutine is running; “suspended”, if the coroutine has not yet been started or it called coroutine.yield and has not yet been resumed; “normal”, if the coroutine called coroutine.resume and that call has not yet returned (equivalently, if coro is an ancestor of the currently executing coroutine); or “dead”, if its function returned. | |
Syntax | coroutine.status(coroutine coro) |
Returns | string status |
Part of | ComputerCraft |
API | Coroutine |
Examples
Please see Coroutine (API) for a worked example of using all the coroutine functions.