diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-09 15:33:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-09 15:33:08 +0800 |
commit | 438fa5d57a8799a45f99afaa499fb658d414a54d (patch) | |
tree | 8e873e861a799f2c6fe795f96ae804067b7d4742 /script/brave/brave.lua | |
parent | bc5e23e547f37eef194a7d6cdfbde14b73472bd2 (diff) | |
download | lua-language-server-438fa5d57a8799a45f99afaa499fb658d414a54d.zip |
share channel
Diffstat (limited to 'script/brave/brave.lua')
-rw-r--r-- | script/brave/brave.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/script/brave/brave.lua b/script/brave/brave.lua index 44176337..c5ad733b 100644 --- a/script/brave/brave.lua +++ b/script/brave/brave.lua @@ -14,7 +14,7 @@ function m.register(id) if #m.queue > 0 then for _, info in ipairs(m.queue) do - m.waiter:push(info.name, info.params) + m.waiter:push(m.id, info.name, info.params) end end m.queue = nil @@ -30,7 +30,7 @@ end --- 报告 function m.push(name, params) if m.waiter then - m.waiter:push(name, params) + m.waiter:push(m.id, name, params) else m.queue[#m.queue+1] = { name = name, @@ -47,15 +47,15 @@ function m.start() local ability = m.ability[name] -- TODO if not ability then - m.waiter:push(id) + m.waiter:push(m.id, id) log.error('Brave can not handle this work: ' .. name) goto CONTINUE end local ok, res = xpcall(ability, log.error, params) if ok then - m.waiter:push(id, res) + m.waiter:push(m.id, id, res) else - m.waiter:push(id) + m.waiter:push(m.id, id) end m.push('mem', collectgarbage 'count') ::CONTINUE:: |