endless monitior

This commit is contained in:
云风
2012-09-28 21:10:39 +08:00
parent c50e465879
commit 689108df60
4 changed files with 40 additions and 10 deletions

View File

@@ -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