diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-16 22:31:12 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-16 22:31:12 +0000 |
commit | fe5a2515ac8f67924243c22770836ccf088ebfb8 (patch) | |
tree | 655e6a6434a1bc90a916dea7b2ba493fca0f3b4f /util | |
parent | 04e125d52f700426e94158a69a496a834e7953ce (diff) | |
download | prosody-fe5a2515ac8f67924243c22770836ccf088ebfb8.tar.gz prosody-fe5a2515ac8f67924243c22770836ccf088ebfb8.zip |
util.async: Add comment
Diffstat (limited to 'util')
-rw-r--r-- | util/async.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/async.lua b/util/async.lua index e16d5b24..205db183 100644 --- a/util/async.lua +++ b/util/async.lua @@ -21,6 +21,7 @@ local function runner_continue(thread) -- Running the coroutine failed, which means we have to find the runner manually, -- in order to inform the error handler local level = 0; + -- Find the 'level' of the top-most function (0 == current level, 1 == caller, ...) while debug.getinfo(thread, level, "") do level = level + 1; end ok, runner = debug.getlocal(thread, level-1, 1); assert(ok == "self", "unexpected async state: variable mismatch"); |