remove ssm and add string id

This commit is contained in:
Cloud Wu
2019-06-18 14:09:36 +08:00
committed by 云风
parent 7032f21d18
commit 5d26fb3f18
20 changed files with 183 additions and 1172 deletions

View File

@@ -8,8 +8,6 @@ skynet.start(function()
local launcher = assert(skynet.launch("snlua","launcher"))
skynet.name(".launcher", launcher)
skynet.newservice "garbagecollect"
local harbor_id = tonumber(skynet.getenv "harbor" or 0)
if harbor_id == 0 then
assert(standalone == nil)

View File

@@ -1,26 +0,0 @@
local skynet = require "skynet"
local ssm = require "skynet.ssm"
local function ssm_info()
return ssm.info()
end
local function collect()
local info = {}
while true do
-- while ssm.collect(false, info) do
-- skynet.error(string.format("Collect %d strings from %s, sweep %d", info.n, info.key, info.sweep))
-- end
ssm.collect(true)
skynet.sleep(50)
end
end
skynet.start(function()
if ssm.disable then
skynet.error "Short String Map (SSM) Disabled"
skynet.exit()
end
skynet.info_func(ssm_info)
skynet.fork(collect)
end)