Difference between revisions of "Lua:checkSynchronize"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "Category:Lua {{CodeBox|'''function''' checkSynchronize(''timeout'') ''':''' void}} Executes queued synchronize calls. Call this from an infinite loop in the main thread...")
 
m (Syntax Highlighting.)
Line 21: Line 21:
  
 
===Examples===
 
===Examples===
<pre>
+
<syntaxhighlight lang="lua" line>
 
while true do
 
while true do
 
   checkSynchronize()
 
   checkSynchronize()
Line 27: Line 27:
 
   -- Other loop logic here
 
   -- Other loop logic here
 
end
 
end
</pre>
+
</syntaxhighlight>
  
<pre>
+
<syntaxhighlight lang="lua" line>
 
while true do
 
while true do
 
   checkSynchronize(100)
 
   checkSynchronize(100)
Line 35: Line 35:
 
   -- Other loop logic here
 
   -- Other loop logic here
 
end
 
end
</pre>
+
</syntaxhighlight>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}

Revision as of 19:39, 25 June 2026

<> Lua API Reference

function checkSynchronize(timeout) : void

Executes queued synchronize calls.

Call this from an infinite loop in the main thread when using threading and synchronize calls, so pending synchronized calls can be processed.

Function Parameters

Parameter Type Description
timeout Integer (optional) The optional timeout value used while checking for queued synchronize calls.

Returns

void — This function does not return any value.

Examples

1 while true do
2   checkSynchronize()
3 
4   -- Other loop logic here
5 end
1 while true do
2   checkSynchronize(100)
3 
4   -- Other loop logic here
5 end

Main Pages

Core Lua documentation entry points

Lua
Script Engine