[asterisk-commits] dlee: branch dlee/performance r399335 - /team/dlee/performance/main/stasis.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 18 00:24:12 CDT 2013


Author: dlee
Date: Wed Sep 18 00:24:10 2013
New Revision: 399335

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399335
Log:
Get rid of just the threadpool

Modified:
    team/dlee/performance/main/stasis.c

Modified: team/dlee/performance/main/stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/performance/main/stasis.c?view=diff&rev=399335&r1=399334&r2=399335
==============================================================================
--- team/dlee/performance/main/stasis.c (original)
+++ team/dlee/performance/main/stasis.c Wed Sep 18 00:24:10 2013
@@ -458,7 +458,6 @@
  * \internal
  * \brief Information needed to dispatch a message to a subscription
  */
-#if 0
 struct dispatch {
 	/*! Topic message was published to */
 	struct stasis_topic *topic;
@@ -515,7 +514,6 @@
 
 	return 0;
 }
-#endif
 
 void stasis_forward_message(struct stasis_topic *_topic, struct stasis_topic *publisher_topic, struct stasis_message *message)
 {
@@ -536,7 +534,6 @@
 		ast_assert(sub != NULL);
 
 		if (sub->mailbox) {
-#if 0
 			RAII_VAR(struct dispatch *, dispatch, NULL, ao2_cleanup);
 
 			dispatch = dispatch_create(publisher_topic, message, sub);
@@ -545,6 +542,7 @@
 				break;
 			}
 
+#if 0
 			if (ast_taskprocessor_push(sub->mailbox, dispatch_exec, dispatch) == 0) {
 				/* Ownership transferred to mailbox.
 				 * Don't increment ref, b/c the task processor
@@ -552,10 +550,12 @@
 				 */
 				dispatch = NULL;
 			}
+#else
+			ao2_lock(sub);
+			dispatch_exec(dispatch);
+			dispatch = NULL;
+			ao2_unlock(sub);
 #endif
-			ao2_lock(sub);
-			subscription_invoke(sub, publisher_topic, message);
-			ao2_unlock(sub);
 		} else {
 			/* Dispatch directly */
 			subscription_invoke(sub, publisher_topic, message);




More information about the asterisk-commits mailing list