From a18691f2292d17da2b4c7a3bb687efb9ef0bab22 Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Fri, 17 Jul 2020 22:47:42 +1000 Subject: [PATCH] [modified] async stall resume behaviour implemented in terms of a tail call --- async.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async.lua b/async.lua index 05f8dc3..c4cb3d7 100644 --- a/async.lua +++ b/async.lua @@ -51,7 +51,7 @@ function async:update() if #self.tasks_stalled > 0 then --swap queues rather than churning elements self.tasks_stalled, self.tasks = self.tasks, self.tasks_stalled - td = table.remove(self.tasks, 1) + return self:update() else return false end