aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-16 17:12:09 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-16 17:12:09 +0000
commit359f425e7178855ec096452338896595a4f16a6f (patch)
tree1de77acef1e1e662f3b548678e7540614a34ba9a /util
parenta19c168d25b5980b4cf33777684405a74511b934 (diff)
downloadprosody-359f425e7178855ec096452338896595a4f16a6f.tar.gz
prosody-359f425e7178855ec096452338896595a4f16a6f.zip
util.async: Fix order of statements so queue count makes more sense
Diffstat (limited to 'util')
-rw-r--r--util/async.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/async.lua b/util/async.lua
index eac74c1d..e5f12f28 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -108,8 +108,8 @@ end
-- Add a task item for the runner to process
function runner_mt:run(input)
if input ~= nil then
- self:log("debug", "queued new work item, %d items queued", #self.queue);
table.insert(self.queue, input);
+ self:log("debug", "queued new work item, %d items queued", #self.queue);
end
if self.state ~= "ready" then
-- The runner is busy. Indicate that the task item has been
@@ -176,6 +176,7 @@ end
-- Add a task item to the queue without invoking the runner, even if it is idle
function runner_mt:enqueue(input)
table.insert(self.queue, input);
+ self:log("debug", "queued new work item, %d items queued", #self.queue);
end
function runner_mt:log(level, fmt, ...)