fix attempt 1 of the terminate check stopping the mainloop

This commit is contained in:
2026-06-25 15:34:43 -05:00
parent cd9ac740a1
commit 4f874af256

View File

@@ -775,7 +775,12 @@ function Main()
-- Add a small delay to avoid overloading the system
os.sleep(0.1)
local event = os.pullEventRaw("terminate")
local event = nil
local function getTerminateEvent()
event = os.pullEventRaw("terminate")
end
parallel.waitForAny(os.sleep(0.1), getTerminateEvent)
if event == "terminate" then print("Terminate Event Received") break end
end