summaryrefslogtreecommitdiff
path: root/script-beta/await.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-21 20:52:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-21 20:52:05 +0800
commitca322946af06afa7bfd93fa176812ceed854730e (patch)
treee32e54acea059359a27ecf35c9ab305d8a5e0f51 /script-beta/await.lua
parent0bb3565ed9e8f3fb0d9501f7ac2b3c7aa0245a86 (diff)
downloadlua-language-server-ca322946af06afa7bfd93fa176812ceed854730e.zip
优化性能
Diffstat (limited to 'script-beta/await.lua')
-rw-r--r--script-beta/await.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/await.lua b/script-beta/await.lua
index 9da40027..4b63b8ef 100644
--- a/script-beta/await.lua
+++ b/script-beta/await.lua
@@ -87,10 +87,13 @@ function m.close(id)
if not map then
return
end
+ local count = 0
for co in pairs(map) do
map[co] = nil
coroutine.close(co)
+ count = count + 1
end
+ log.debug('Close await:', count)
end
--- 休眠一段时间