From b3a8432f86718e1984dc1b37064953c975345e2b Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Mon, 22 Apr 2019 16:12:36 -0400 Subject: [PATCH] milo: big oops --- milo/apis/taskRunner.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/milo/apis/taskRunner.lua b/milo/apis/taskRunner.lua index e12c219..e9e367f 100644 --- a/milo/apis/taskRunner.lua +++ b/milo/apis/taskRunner.lua @@ -44,7 +44,7 @@ function TaskRunner:run() if #self.tasks > 0 then local event = { } - while #self.tasks > 0 do + while true do for n = #self.tasks, 1, -1 do local task = self.tasks[n] if task.filter == nil or task.filter == event[1] or event[1] == "terminate" then @@ -59,6 +59,9 @@ function TaskRunner:run() end end end + if #self.tasks == 0 then + break + end event = { os.pullEventRaw() } end end