mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-10 02:31:48 +00:00
[modified] async stall resume behaviour implemented in terms of a tail call
This commit is contained in:
parent
9e8793668f
commit
a18691f229
@ -51,7 +51,7 @@ function async:update()
|
|||||||
if #self.tasks_stalled > 0 then
|
if #self.tasks_stalled > 0 then
|
||||||
--swap queues rather than churning elements
|
--swap queues rather than churning elements
|
||||||
self.tasks_stalled, self.tasks = self.tasks, self.tasks_stalled
|
self.tasks_stalled, self.tasks = self.tasks, self.tasks_stalled
|
||||||
td = table.remove(self.tasks, 1)
|
return self:update()
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user