summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-09 15:38:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-09 15:38:06 +0800
commitbad352124b71e61e74c9fd326868086798cad83a (patch)
treeba88875da9450d819d4a08a96ed6e333c9b20b07 /script
parent438fa5d57a8799a45f99afaa499fb658d414a54d (diff)
downloadlua-language-server-bad352124b71e61e74c9fd326868086798cad83a.zip
block worker
Diffstat (limited to 'script')
-rw-r--r--script/await.lua4
-rw-r--r--script/service/service.lua12
2 files changed, 8 insertions, 8 deletions
diff --git a/script/await.lua b/script/await.lua
index d319b6e7..bfc1fd55 100644
--- a/script/await.lua
+++ b/script/await.lua
@@ -192,7 +192,9 @@ function m.step()
end
return true
else
- m.delayQueue = {}
+ for i = 1, #m.delayQueue do
+ m.delayQueue[i] = nil
+ end
m.delayQueueIndex = 1
return false
end
diff --git a/script/service/service.lua b/script/service/service.lua
index 4af52f64..f8bf4d7c 100644
--- a/script/service/service.lua
+++ b/script/service/service.lua
@@ -143,14 +143,12 @@ function m.startTimer()
if await.step() then
m.working = true
m.sleeping = false
- goto CONTINUE
- end
- if m.working then
- m.working = false
- m.idleClock = os.clock()
+ else
+ if m.working then
+ m.working = false
+ m.idleClock = os.clock()
+ end
end
- thread.sleep(0.001)
- ::CONTINUE::
timer.update()
end
end