Difference between revisions of "Lua:checkSynchronize"
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 (Added related function template.) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 21: | Line 21: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <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 | ||
| − | </ | + | </syntaxhighlight> |
| − | < | + | <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 | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| + | |||
| + | {{Threads}} | ||
Latest revision as of 20:55, 26 June 2026
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[edit]
| Parameter | Type | Description |
|---|---|---|
| timeout | Integer (optional) | The optional timeout value used while checking for queued synchronize calls. |
Returns[edit]
void — This function does not return any value.
Examples[edit]
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