mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
rewrite SSM and clonefunction
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
local skynet = require "skynet"
|
||||
local harbor = require "skynet.harbor"
|
||||
require "skynet.manager" -- import skynet.launch, ...
|
||||
local memory = require "skynet.memory"
|
||||
|
||||
skynet.start(function()
|
||||
local sharestring = tonumber(skynet.getenv "sharestring" or 4096)
|
||||
memory.ssexpand(sharestring)
|
||||
|
||||
local standalone = skynet.getenv "standalone"
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user