Fix: task queue not working

This commit is contained in:
Coder12a 2019-05-21 11:51:50 -05:00
parent bc3125b34a
commit fd6c593066
1 changed files with 3 additions and 3 deletions

View File

@ -159,8 +159,8 @@ function async.Async()
local last_time = minetest.get_us_time() / 1000
local maxtime = self.maxtime
while(true) do
local task_func = self.task_queue[1]
table.remove(self.task_queue, 1)
local task_func = self.task_queue[#self.task_queue]
self.task_queue[#self.task_queue] = nil
if task_func and task_func.func then
pass_arg = nil
local p = task_func.func()