diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-14 20:34:25 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-14 20:34:25 +0800 |
commit | 1e6387f2602329cd0bfa33b80e551be4c7cadfeb (patch) | |
tree | 1113fb9879a1b93bca05c91cfb0054478f0c70f4 /server-beta/src | |
parent | 5306630e69f2129fbf7ced43f63ff041f3a513a3 (diff) | |
download | lua-language-server-1e6387f2602329cd0bfa33b80e551be4c7cadfeb.zip |
先处理所有的协议,然后再步进协程
Diffstat (limited to 'server-beta/src')
-rw-r--r-- | server-beta/src/pub/pub.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/server-beta/src/pub/pub.lua b/server-beta/src/pub/pub.lua index 19800e95..2cb1b4e8 100644 --- a/server-beta/src/pub/pub.lua +++ b/server-beta/src/pub/pub.lua @@ -202,14 +202,16 @@ end ---@return integer function m.recieve() for _, brave in ipairs(m.braves) do - local suc, id, result = brave.waiter:pop() - if not suc then - goto CONTINUE - end - if type(id) == 'string' then - m.popReport(brave, id, result) - else - m.popTask(brave, id, result) + while true do + local suc, id, result = brave.waiter:pop() + if not suc then + goto CONTINUE + end + if type(id) == 'string' then + m.popReport(brave, id, result) + else + m.popTask(brave, id, result) + end end ::CONTINUE:: end |