Difference between revisions of "Core.yield"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
m |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
=== Description === | === Description === | ||
− | + | Yields the function running as background task. | |
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Core.yield(state) | Core.yield(state) | ||
− | </ | + | </syntaxhighlight> |
Core.yield([number of seconds to wait]) | Core.yield([number of seconds to wait]) |
Latest revision as of 04:37, 2 November 2024
Available since: Gideros 2016.06
Class: Core
Description
Yields the function running as background task.
Core.yield(state)
Core.yield([number of seconds to wait])
Core.yield(true) -- yield for a single frame and disable auto yield
Core.yield(false) -- don't yield now, but reenable autoyield
Parameters
state: (number or boolean) number of seconds to yield or boolean to enable/disable auto yield