I want to process my mailbox, then take the attachments and finally delete the email.
Two of these actions interacts with the global command queue.
If I want to make sure everything is processed in order, I need to be able to wait after the queue. As such I've created a small function that loops while the queue becomes available.
Code:
local function wait_for_queue()
local queue_is_not_ready = Inspect.Queue.Status("global")
while queue_is_not_ready == true do
queue_is_not_ready = Inspect.Queue.Status("global")
end
end
Unfortunately when I get in this "loop" the CPU time gets eaten entirely and crashes the Game client.
My question is how do you get to wait for the Queue without crashing the game client?