Garry's Mod Wiki

coroutine.isyieldable

  boolean coroutine.isyieldable()

Description

Returns whether the running coroutine can yield.
A running coroutine is yieldable if it is not in the main thread, and it is not inside a non-yieldable C function.

This is only available on the x86-64 versions, because of the difference in the LuaJIT version. See here

Returns

1 boolean canyield
Returns true when the running coroutine can yield.