You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/02/13 13:03:28 UTC

svn commit: r377359 - in /webservices/axis2/trunk/c: include/axis2_thread_pool.h modules/core/transport/http/receiver/http_svr_thread.c modules/util/thread_pool.c

Author: sahan
Date: Mon Feb 13 04:03:26 2006
New Revision: 377359

URL: http://svn.apache.org/viewcvs?rev=377359&view=rev
Log:
Added threading to the http_server

Modified:
    webservices/axis2/trunk/c/include/axis2_thread_pool.h
    webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
    webservices/axis2/trunk/c/modules/util/thread_pool.c

Modified: webservices/axis2/trunk/c/include/axis2_thread_pool.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_thread_pool.h?rev=377359&r1=377358&r2=377359&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_thread_pool.h (original)
+++ webservices/axis2/trunk/c/include/axis2_thread_pool.h Mon Feb 13 04:03:26 2006
@@ -101,13 +101,13 @@
 					axis2_allocator_t *allocator);
 
 #define AXIS2_THREAD_POOL_GET_THREAD(thread_pool, func, data) \
-						((thread_pool)->get_thread(thread_pool, func, data))
+						((thread_pool)->ops->get_thread(thread_pool, func, data))
 #define AXIS2_THREAD_POOL_JOIN_THREAD(thread_pool, thd) \
-						((thread_pool)->join_thread(thread_pool, thd))
+						((thread_pool)->ops->join_thread(thread_pool, thd))
 #define AXIS2_THREAD_POOL_EXIT_THREAD(thread_pool, thd) \
-						((thread_pool)->exit_thread(thread_pool, thd))
+						((thread_pool)->ops->exit_thread(thread_pool, thd))
 #define AXIS2_THREAD_POOL_THREAD_DETACH(thread_pool, thd) \
-						((thread_pool)->thread_detach(thread_pool, thd))
+						((thread_pool)->ops->thread_detach(thread_pool, thd))
 #define AXIS2_THREAD_POOL_FREE(thread_pool) ((thread_pool)->free(thread_pool))
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c?rev=377359&r1=377358&r2=377359&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/receiver/http_svr_thread.c Mon Feb 13 04:03:26 2006
@@ -190,7 +190,9 @@
 		arg_list->env = env;
 		arg_list->socket = socket;
 		arg_list->worker = svr_thread_impl->worker;
-		worker_func(NULL, (void*)arg_list);
+		AXIS2_THREAD_POOL_GET_THREAD((*env)->thread_pool, worker_func, 
+						(void*)arg_list);
+		/*worker_func(NULL, (void*)arg_list);*/
 	}
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/util/thread_pool.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/thread_pool.c?rev=377359&r1=377358&r2=377359&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/thread_pool.c (original)
+++ webservices/axis2/trunk/c/modules/util/thread_pool.c Mon Feb 13 04:03:26 2006
@@ -72,6 +72,10 @@
 		axis2_thread_pool_free(&(pool_impl->thread_pool));
 		return NULL;
 	}
+	pool_impl->thread_pool.ops->get_thread = axis2_thread_pool_get_thread;
+	pool_impl->thread_pool.ops->join_thread = axis2_thread_pool_join_thread;
+	pool_impl->thread_pool.ops->exit_thread = axis2_thread_pool_exit_thread;
+	pool_impl->thread_pool.ops->thread_detach = axis2_thread_pool_thread_detach;
 	pool_impl->thread_pool.ops->free = axis2_thread_pool_free;
 	return &(pool_impl->thread_pool);
 }