Changeset 1473:8784c4181a22
- Timestamp:
- 08/27/10 05:24:32 (18 months ago)
- Branch:
- default
- Location:
- sources
- Files:
-
- 2 edited
-
include/libdodo/cgiFastServer.h (modified) (1 diff)
-
src/cgiFastServer.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sources/include/libdodo/cgiFastServer.h
r1439 r1473 95 95 * @param data defines the data passed to the thread 96 96 */ 97 static void *thread(void *data);97 static int thread(void *data); 98 98 99 99 static pc::sync::thread accept; ///< accept lock -
sources/src/cgiFastServer.cc
r1464 r1473 33 33 #include <fcgiapp.h> 34 34 35 #ifdef PTHREAD_EXT36 #include <pthread.h>37 #endif38 39 35 #include "cgiFastRequest.inline" 40 36 41 37 #include <libdodo/cgiFastServer.h> 42 38 #include <libdodo/types.h> 39 #include <libdodo/pcExecutionThread.h> 40 #include <libdodo/pcExecutionManager.h> 43 41 #include <libdodo/cgiFastServerEx.h> 44 42 #include <libdodo/cgiFastExchange.h> … … 92 90 //------------------------------------------------------------------- 93 91 94 void * 92 int 95 93 server::thread(void *data) 96 94 { … … 129 127 } 130 128 131 return NULL;129 return 0; 132 130 } 133 131 … … 142 140 handler = func; 143 141 144 #ifdef PTHREAD_EXT145 142 if (threading) { 146 p thread_t *id = new pthread_t[threadsNum];143 pc::execution::manager m; 147 144 148 unsigned int i = 0; 145 for (unsigned int i = 0; i < threadsNum; ++i) 146 m.run(m.add(pc::execution::thread(server::thread, &limit, pc::execution::ON_DESTRUCTION_STOP, false))); 149 147 150 for (; i < threadsNum; ++i) 151 pthread_create(&id[i], NULL, server::thread, &limit); 152 153 for (i = 0; i < threadsNum; ++i) 154 pthread_join(id[i], NULL); 155 156 delete [] id; 157 } else 158 #endif 159 { 148 m.wait(); 149 } else { 160 150 unsigned long requests = 0; 161 151
Note: See TracChangeset
for help on using the changeset viewer.
