functionM.run() skynet.monitor('monitor_exit') local cmgr = skynet.uniqueservice('contriner_mgr') skynet.uniqueservice("debug_console", skynet.getenv('debug_port'))
local before_run_list = {} --先跑 local delay_run_list = {} --延迟再次调用再跑 for mod_name,mod_cfg in table_util.sort_ipairs(load_mods,function(a,b) return a.launch_seq < b.launch_seq end) do ifnot mod_cfg.delay_run then table.insert(before_run_list, mod_name) else table.insert(delay_run_list, mod_name) end end local self_address = skynet.self() skynet.call(cmgr, 'lua', 'load_modules', self_address, table.unpack(before_run_list)) returnfunction() ifnot delay_run_list thenreturnend skynet.call(cmgr, 'lua', 'load_modules', self_address, table.unpack(delay_run_list)) delay_run_list = nil end end