fix attempt 1 of the terminate check stopping the mainloop
This commit is contained in:
7
main.lua
7
main.lua
@@ -775,7 +775,12 @@ function Main()
|
|||||||
-- Add a small delay to avoid overloading the system
|
-- Add a small delay to avoid overloading the system
|
||||||
os.sleep(0.1)
|
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
|
if event == "terminate" then print("Terminate Event Received") break end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user