int i;
struct CtdlThreadNode *last_worker;
- /* We can't use CT_PUSH() here so we do it the long way
- * So we can still use CT for current thread */
- struct CtdlThreadNode *_this_cit_thread;
-
/*
* Initialise the thread system
*/
ctdl_thread_internal_init();
- _this_cit_thread = CtdlThreadSelf();
/*
* Now create a bunch of worker threads.
*/
*/
// if ((CtdlThreadGetWorkers() < config.c_max_workers) && (CtdlThreadGetWorkers() < num_sessions))
// && (CtdlThreadLoadAvg < 90) )
- if ((CtdlThreadGetWorkers() < config.c_max_workers) && (CtdlThreadGetWorkerAvg() > 60) && (CtdlThreadGetLoadAvg() < 90) )
+ if ((CtdlThreadGetWorkers() < config.c_max_workers) && (CtdlThreadGetWorkerAvg() > 60) && (CtdlThreadGetLoadAvg() < 90) && (CT->state > CTDL_THREAD_STOP_REQ))
{
for (i=0; i<5 ; i++)
// for (i=0; i< (num_sessions - CtdlThreadGetWorkers()) ; i++)