local tasks = self.tasks
self.tasks = {}
for _, t in ipairs(tasks) do
- local continue, status = coroutine.resume(t)
- if status then
- print(status)
- end
- if continue then
+ if coroutine.status(t) ~= "dead" and coroutine.resume(t) then
table.insert(self.tasks, t)
end
end