Difference between revisions of "Core.setAutoYield"

From GiderosMobile
 
Line 4: Line 4:
  
 
=== Description ===
 
=== Description ===
Changes auto yield capability of async tasks.
+
When working with async calls, you'll sometimes want to control when your thread is auto yielding or not, because auto-yielding may happen in the middle of something that should never be interrupted.
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
Core.setAutoYield(auto)
 
Core.setAutoYield(auto)
Line 10: Line 10:
  
 
=== Parameters ===
 
=== Parameters ===
'''auto''': (boolean) enable/disable auto yield<br/>
+
'''auto''': (boolean) enable/disable autoyielding for the calling async call<br/>
  
 
{{Core}}
 
{{Core}}

Latest revision as of 23:54, 25 March 2025

Available since: Gideros 2025.2
Class: Core

Description

When working with async calls, you'll sometimes want to control when your thread is auto yielding or not, because auto-yielding may happen in the middle of something that should never be interrupted.

Core.setAutoYield(auto)

Parameters

auto: (boolean) enable/disable autoyielding for the calling async call