Skip to main content

running

Function running 

Source
pub fn running() -> (thread, boolean)
Expand description

Returns the running coroutine plus a boolean that is true when the running coroutine is the main one.

§Examples

local co, ismain = coroutine.running()
print(ismain)    --> true   (called from the main coroutine)