[prev in list] [next in list] [prev in thread] [next in thread]
List: asterisk-commits
Subject: [asterisk-commits] rmudgett: trunk r382295 - /trunk/main/threadpool.c
From: SVN commits to the Asterisk project <asterisk-commits () lists ! digium ! com>
Date: 2013-02-28 21:31:18
Message-ID: E1UBB4Q-0003zV-7f () wibble ! digium ! internal
[Download RAW message or body]
Author: rmudgett
Date: Thu Feb 28 15:31:14 2013
New Revision: 382295
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382295
Log:
threadpool: Make ast_threadpool_push() return -1 if shutting_down
Modified:
trunk/main/threadpool.c
Modified: trunk/main/threadpool.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/threadpool.c?view=diff&rev=382295&r1=382294&r2=382295
==============================================================================
--- trunk/main/threadpool.c (original)
+++ trunk/main/threadpool.c Thu Feb 28 15:31:14 2013
@@ -898,7 +898,7 @@
if (!pool->shutting_down) {
return ast_taskprocessor_push(pool->tps, task, data);
}
- return 0;
+ return -1;
}
void ast_threadpool_shutdown(struct ast_threadpool *pool)
@@ -1143,7 +1143,9 @@
struct serializer *ser = ast_taskprocessor_listener_get_user_data(listener);
struct ast_taskprocessor *tps = ast_taskprocessor_listener_get_tps(listener);
- ast_threadpool_push(ser->pool, execute_tasks, tps);
+ if (ast_threadpool_push(ser->pool, execute_tasks, tps)) {
+ ast_taskprocessor_unreference(tps);
+ }
}
}
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic