关于 skynet.kill 接口的疑问
#1383
-
function skynet.kill(name)
if type(name) == "number" then
skynet.send(".launcher","lua","REMOVE",name, true)
name = skynet.address(name)
end
c.command("KILL",name)
end 问下具体是为什么这样考虑?谢谢! |
Beta Was this translation helpful? Give feedback.
Answered by
cloudwu
Apr 12, 2021
Replies: 1 comment
-
首先 kill ,连同给服务起名字,都是希望淘汰的 api 。尤其是服务命名,希望能在上层做,而不是在底层做。 其次, launcher (至少在以前)只有处理数字地址的能力。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
t0350
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先 kill ,连同给服务起名字,都是希望淘汰的 api 。尤其是服务命名,希望能在上层做,而不是在底层做。
其次, launcher (至少在以前)只有处理数字地址的能力。