[modified] async stall resume behaviour implemented in terms of a tail call

This commit is contained in:
Max Cahill 2020-07-17 22:47:42 +10:00
parent 9e8793668f
commit a18691f229

View File

@ -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