summaryrefslogtreecommitdiff
path: root/script/proto
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-23 01:46:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-23 01:46:11 +0800
commita43d4d492265d07b12201699c7a1c41a2dc90b34 (patch)
tree6d9f963888065fd50b2d445c070040d1aae60460 /script/proto
parent3929a6782ebd76db7e0c147bc530a767feb04e26 (diff)
downloadlua-language-server-a43d4d492265d07b12201699c7a1c41a2dc90b34.zip
rename "waker" to "resume"
Diffstat (limited to 'script/proto')
-rw-r--r--script/proto/proto.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/proto/proto.lua b/script/proto/proto.lua
index d8538d8f..bc3f41f4 100644
--- a/script/proto/proto.lua
+++ b/script/proto/proto.lua
@@ -76,8 +76,8 @@ function m.awaitRequest(name, params)
}
--log.debug('Request', name, #buf)
io.stdout:write(buf)
- return await.wait(function (waker)
- m.waiting[id] = waker
+ return await.wait(function (resume)
+ m.waiting[id] = resume
end)
end
@@ -123,8 +123,8 @@ end
function m.doResponse(proto)
local id = proto.id
- local waker = m.waiting[id]
- if not waker then
+ local resume = m.waiting[id]
+ if not resume then
log.warn('Response id not found: ' .. util.dump(proto))
return
end
@@ -133,7 +133,7 @@ function m.doResponse(proto)
log.warn(('Response error [%d]: %s'):format(proto.error.code, proto.error.message))
return
end
- waker(proto.result)
+ resume(proto.result)
end
function m.listen()