Difference between revisions of "Coroutine.isyieldable"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2022.3<br/> '''Class:''' coroutine<br/> === Description === Returns true if the coroutine this function is called within can safe...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Returns true if the coroutine this function is called within can safely yield. | Returns true if the coroutine this function is called within can safely yield. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(boolean) = coroutine.isyieldable() | (boolean) = coroutine.isyieldable() | ||
− | </ | + | </syntaxhighlight> |
'''Yielding a coroutine inside metamethods or C functions is prohibited, with the exception of pcall and xpcall''' | '''Yielding a coroutine inside metamethods or C functions is prohibited, with the exception of pcall and xpcall''' |
Latest revision as of 14:26, 13 July 2023
Available since: Gideros 2022.3
Class: coroutine
Description
Returns true if the coroutine this function is called within can safely yield.
(boolean) = coroutine.isyieldable()
Yielding a coroutine inside metamethods or C functions is prohibited, with the exception of pcall and xpcall
Return values
Returns (boolean) result