coroutine.running

From ComputerCraft
Jump to navigation Jump to search

coroutine.running
Function
Syntax
coroutine.running()
Returns thread
API coroutine
Source Lua

Returns the currently running coroutine, or nil if running outside a coroutine.

ExampleExampleGet the status of the coroutine the program is running in.
Get the status of the coroutine the program is running in.
Code
coroutine.status(coroutine.running())
Output running