Add skynet.killthread() and debugcommand killtask

This commit is contained in:
Cloud Wu
2020-10-14 14:12:29 +08:00
parent 064e61d40f
commit b6354a0490
3 changed files with 73 additions and 2 deletions

View File

@@ -164,6 +164,7 @@ function COMMAND.help()
netstat = "netstat : show netstat",
profactive = "profactive [on|off] : active/deactive jemalloc heap profilling",
dumpheap = "dumpheap : dump heap profilling",
killtask = "killtask address threadname : threadname listed by task",
}
end
@@ -277,6 +278,11 @@ function COMMAND.task(address)
return skynet.call(address,"debug","TASK")
end
function COMMAND.killtask(address, threadname)
address = adjust_address(address)
return skynet.call(address, "debug", "KILLTASK", threadname)
end
function COMMAND.uniqtask(address)
address = adjust_address(address)
return skynet.call(address,"debug","UNIQTASK")