Core.yieldlock: Difference between revisions

From GiderosMobile
Created page with "'''Available since:''' Gideros 2025.2.2<br/> '''Class:''' Core<br/> === Description === Locks the current thread. <syntaxhighlight lang="lua"> Core.yieldlock() </syntaxhi..."
 
No edit summary
 
Line 3: Line 3:


=== Description ===
=== Description ===
Locks the current thread.
Ensure the thread won't yield, an error will be thrown if it tries to do so. This is mostly for debugging purposes. There must be exactly the same number of Core.yieldlock(true) and Core.yieldlock(false) in your code paths.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Core.yieldlock()
Core.yieldlock(bool)
</syntaxhighlight>
</syntaxhighlight>
=== Parameters ===
'''bool''': (boolean) enable/disable current thread locking<br/>


{{Core}}
{{Core}}

Latest revision as of 21:53, 25 March 2025

Available since: Gideros 2025.2.2
Class: Core

Description

Ensure the thread won't yield, an error will be thrown if it tries to do so. This is mostly for debugging purposes. There must be exactly the same number of Core.yieldlock(true) and Core.yieldlock(false) in your code paths.

Core.yieldlock(bool)

Parameters

bool: (boolean) enable/disable current thread locking