CtdlThreadNode *last_worker;
struct timeval start, now, result;
double last_duration;
-
+
/*
* Initialise the thread system
*/
#endif /* NEW_WORKER */
{
/* Only start new threads if we are not going to overload the machine */
- if (CtdlThreadGetLoadAvg() < ((double)1.00)) {
+ /* Temporarily set to 10 should be enough to make sure we don't stranglew the server
+ * at least until we make this a config option */
+ if (CtdlThreadGetLoadAvg() < ((double)10.00)) {
for (i=0; i<5 ; i++) {
#ifdef NEW_WORKER
CtdlThreadCreate("Worker Thread (new)",
int m, i;
int retval = 0;
struct timeval tv;
- struct CitContext *con;
+ CitContext *con;
const char *old_name;
* If the select succeeds the thread goes off to handle the client request.
* If the list of client connections is empty the threads all sleep for one second
*/
-struct CitContext *select_on_client(void)
+CitContext *select_on_client(void)
{
fd_set readfds;
struct timeval tv;
/*
* Do the worker threads work when needed
*/
-int execute_session(struct CitContext *bind_me)
+int execute_session(CitContext *bind_me)
{
int force_purge;
void *new_worker_thread(void *arg)
{
- struct CitContext *bind_me;
+ CitContext *bind_me;
int force_purge;
while (!CtdlThreadCheckStop()) {