Difference between revisions of "Coroutine.running"
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) |
||
Line 2: | Line 2: | ||
|name=coroutine.running | |name=coroutine.running | ||
|api=Coroutine | |api=Coroutine | ||
− | |returns= | + | |returns={{Type|coroutine}} the executing coroutine |
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Returns the running coroutine, | + | |desc=Returns the running coroutine. If only the implicit top-level coroutine is running, [[nil]] is returned; however, ordinary applications will never see this because the CraftOS BIOS runs the shell, and therefore any application code, inside a coroutine. |
− | |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:25, 22 April 2013
Function coroutine.running | |
Returns the running coroutine. If only the implicit top-level coroutine is running, nil is returned; however, ordinary applications will never see this because the CraftOS BIOS runs the shell, and therefore any application code, inside a coroutine. | |
Syntax | coroutine.running() |
Returns | coroutine the executing coroutine |
Part of | ComputerCraft |
API | Coroutine |
Examples
Please see Coroutine (API) for a worked example of using all the coroutine functions.