coroutine.running

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

ExampleGet the status of the coroutine the program is running in.
Get the status of the coroutine the program is running in.
Code
<nowiki>
coroutine.status(coroutine.running())
</nowiki>
Output running

coroutine.running
Function
Syntax
coroutine.running()
Returns thread
API coroutine
Source Lua
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.