Fixed > 1 which prevented tasks from being processed if only on task was in queue
This commit is contained in:
parent
8b6b56164a
commit
2f11a80a28
3
init.lua
3
init.lua
@ -888,9 +888,10 @@ function multi:newTask(func)
|
|||||||
multi:newThread("Task Handler",function()
|
multi:newThread("Task Handler",function()
|
||||||
while true do
|
while true do
|
||||||
thread.hold(function()
|
thread.hold(function()
|
||||||
return _tasks > 1
|
return _tasks > 0
|
||||||
end)
|
end)
|
||||||
for i=1,_tasks do
|
for i=1,_tasks do
|
||||||
|
print("Doing tasks")
|
||||||
tasks[i]()
|
tasks[i]()
|
||||||
end
|
end
|
||||||
_tasks = 0
|
_tasks = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user