summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-22 14:41:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-22 14:41:13 +0800
commit04ff98eed8c5545f80dacb636876606e90bb57af (patch)
tree30a4f5d149d4c92f185de5601a7282ea6c46c4f8 /server
parent74a186f7c14a4217dbb630bb30d38d468e71dda6 (diff)
downloadlua-language-server-04ff98eed8c5545f80dacb636876606e90bb57af.zip
不再创建不必要的线程
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index 01c28f97..ee299490 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -355,6 +355,9 @@ function mt:checkWorkSpaceComplete()
end
function mt:_createCompileTask()
+ if not self._needCompile[1] and not next(self._needDiagnostics) then
+ return
+ end
self._compileTask = coroutine.create(function ()
local uri = self._needCompile[1]
if uri then