pub fn isyieldable() -> booleanExpand description
Returns true when the running coroutine can yield โ that is, when it is not the main coroutine and it is not inside a non-yieldable C function.
ยงExamples
print(coroutine.isyieldable()) --> false (main coroutine)
coroutine.wrap(function()
print(coroutine.isyieldable()) --> true
end)()