coroutine.running
Returns the currently running coroutine, or nil if running outside a coroutine.
  | 
  |||
| Get the status of the coroutine the program is running in. | |||
| Code | <nowiki>
coroutine.status(coroutine.running())
</nowiki>
 | 
    ||
| Output | running | ||
Functions  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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.