Difference between revisions of "Core.yield"

From GiderosMobile
m (formatting)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
 
<languages />
 
<languages />
 +
 
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
 
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/Core|Core]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/Core|Core]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate>Yield function running as background task.
+
<translate>Yield function running as background task.</translate>
  
 
Core.yield([number of seconds to wait])
 
Core.yield([number of seconds to wait])
 +
<br/>
 
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</translate>
+
<br/>
 +
Core.yield(false) -- don't yield now, but reenable autoyield
 +
 
 +
 
 
<source lang="lua">
 
<source lang="lua">
 
  Core.yield(state)
 
  Core.yield(state)
 
</source>
 
</source>
 +
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
'''state''': (number or boolean) <translate>number of seconds to yield or boolean to enable/disable auto yield</translate> <br/>
+
'''state''': (number or boolean) <translate>number of seconds to yield or boolean to enable/disable auto yield</translate>
 +
<br/>
 +
<br/>

Revision as of 13:17, 24 September 2019



Available since: Gideros 2016.06
Class: Core

Description

Yield function running as background task.

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


 Core.yield(state)


Parameters

state: (number or boolean) number of seconds to yield or boolean to enable/disable auto yield