From efb8e40a5dcad11c80a2573a52032b8f64ab2580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 25 Jul 2019 14:01:43 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=8B=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/async/async.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src') diff --git a/server/src/async/async.lua b/server/src/async/async.lua index 644a4061..34716502 100644 --- a/server/src/async/async.lua +++ b/server/src/async/async.lua @@ -8,7 +8,7 @@ local GCInfo = {} thread.newchannel 'gc' -local function createTask() +local function createTask(name) TaskId = TaskId + 1 GCInfo[TaskId] = false local id = TaskId @@ -52,7 +52,7 @@ while true do gc:push(ID, collectgarbage 'count') end ]]):format(id, package.cpath, package.path, requestName, responseName) - log.debug('Create thread, id: ', id) + log.debug('Create thread, id: ', id, 'task: ', name) return { id = id, thread = thread.thread(buf), @@ -68,7 +68,7 @@ local function run(name, arg, callback) end local task = table.remove(IdlePool) if not task then - task = createTask() + task = createTask(name) end RunningList[task.id] = { task = task, -- cgit v1.2.3