Difference between revisions of "Core.yield"
From GiderosMobile
m |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Available since:''' Gideros 2016.06<br/> | |
− | ''' | + | '''Class:''' [[Core]]<br/> |
− | === | + | |
− | + | === Description === | |
+ | Yields the function running as background task. | ||
+ | <syntaxhighlight lang="lua"> | ||
+ | Core.yield(state) | ||
+ | </syntaxhighlight> | ||
Core.yield([number of seconds to wait]) | Core.yield([number of seconds to wait]) | ||
+ | |||
Core.yield(true) -- yield for a single frame and disable auto yield | 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<br/> |
− | '''state''': (number or boolean) | + | |
+ | {{Core}} |
Revision as of 05: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
- Core
- Core.asyncCall
- Core.asyncThread
- Core.class
- Core.enableAllocationTracking
- Core.fileLoad
- Core.fileSave
- Core.findReferences
- Core.frameStatistics
- Core.getScriptPath
- Core.profilerReport
- Core.profilerReset
- Core.profilerStart
- Core.profilerStop
- Core.random
- Core.randomSeed
- Core.setAutoYield
- Core.signal
- Core.stopping
- Core.yield
- Core.yieldable
- Core.yieldlock