Fixed > 1 which prevented tasks from being processed if only on task was in queue

This commit is contained in:
Ryan Ward 2022-12-20 14:35:13 -05:00
parent 8b6b56164a
commit 2f11a80a28

View File

@ -888,9 +888,10 @@ function multi:newTask(func)
multi:newThread("Task Handler",function()
while true do
thread.hold(function()
return _tasks > 1
return _tasks > 0
end)
for i=1,_tasks do
print("Doing tasks")
tasks[i]()
end
_tasks = 0