From 8f26a0a3542777a7ab818fe0cd9a336dfcf928f9 Mon Sep 17 00:00:00 2001 From: yuqing Date: Tue, 3 Nov 2015 09:55:43 +0800 Subject: [PATCH] use pthread_detach --- src/sched_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sched_thread.c b/src/sched_thread.c index cc0e407..a153a7b 100644 --- a/src/sched_thread.c +++ b/src/sched_thread.c @@ -292,6 +292,7 @@ static void *sched_call_func(void *args) logDebug("file: "__FILE__", line: %d, " \ "thread exit, task id: %d", __LINE__, task_id); + pthread_detach(pthread_self()); return NULL; } @@ -769,6 +770,7 @@ static void *sched_call_delay_func(void *args) "delay thread exit, task args: %p", __LINE__, task->func_args); fast_mblock_free_object(&pContext->mblock, task); + pthread_detach(pthread_self()); return NULL; }