diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-16 17:12:09 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-16 17:12:09 +0000 |
commit | fd381c6b8d0788dd5cf7506526caf530d15cc028 (patch) | |
tree | 1de77acef1e1e662f3b548678e7540614a34ba9a /util/async.lua | |
parent | 6b147cfc394830ac44dd5020d33e14a8876d151a (diff) | |
download | prosody-fd381c6b8d0788dd5cf7506526caf530d15cc028.tar.gz prosody-fd381c6b8d0788dd5cf7506526caf530d15cc028.zip |
util.async: Fix order of statements so queue count makes more sense
Diffstat (limited to 'util/async.lua')
-rw-r--r-- | util/async.lua | 3 |
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, ...) |