mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
remove ssm and add string id
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user