Added an optional parameter to 'coroutine.isyieldable'

This commit is contained in:
Roberto Ierusalimschy
2019-04-10 13:23:14 -03:00
parent 8ba4523ccc
commit a93e014447
3 changed files with 11 additions and 6 deletions

View File

@@ -6307,11 +6307,12 @@ an object with type @T{"thread"}.
}
@LibEntry{coroutine.isyieldable ()|
@LibEntry{coroutine.isyieldable ([co])|
Returns true when the running coroutine can yield.
Returns true when the coroutine @id{co} can yield.
The default for @id{co} is the running coroutine.
A running coroutine is yieldable if it is not the main thread and
A coroutine is yieldable if it is not the main thread and
it is not inside a non-yieldable @N{C function}.
}