mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
endless monitior
This commit is contained in:
@@ -512,17 +512,17 @@ local function init_all()
|
||||
end
|
||||
|
||||
local function init_template(start)
|
||||
init_all()
|
||||
init_func = {}
|
||||
start()
|
||||
init_all()
|
||||
init_all()
|
||||
init_func = {}
|
||||
start()
|
||||
init_all()
|
||||
end
|
||||
|
||||
function skynet.start(start_func)
|
||||
c.callback(dispatch_message)
|
||||
trace_handle = assert(c.stat "trace")
|
||||
skynet.timeout(0, function()
|
||||
init_template(start_func)
|
||||
init_template(start_func)
|
||||
skynet.send(".launcher","text", "")
|
||||
end)
|
||||
end
|
||||
@@ -533,7 +533,7 @@ function skynet.filter(f ,start_func)
|
||||
end)
|
||||
trace_handle = assert(c.stat "trace")
|
||||
skynet.timeout(0, function()
|
||||
init_template(start_func)
|
||||
init_template(start_func)
|
||||
skynet.send(".launcher","text", "")
|
||||
end)
|
||||
end
|
||||
@@ -550,4 +550,8 @@ function skynet.trace_callback(func)
|
||||
trace_func = func
|
||||
end
|
||||
|
||||
function skynet.endless()
|
||||
return c.command("ENDLESS")~=nil
|
||||
end
|
||||
|
||||
return skynet
|
||||
|
||||
Reference in New Issue
Block a user