time.
Also turn signals back on for threads. For some reason we occasionally
crash on the shutdown but enabling signals in the threads seems to stop
this????? Also ecrash needs the signals turned on.
*/
// if ((CtdlThreadGetWorkers() < config.c_max_workers) && (CtdlThreadGetWorkers() < num_sessions))
// && (CtdlThreadLoadAvg < 90) )
*/
// 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++)
{
for (i=0; i<5 ; i++)
// for (i=0; i< (num_sessions - CtdlThreadGetWorkers()) ; i++)
* when no signals will be processed, but during that time they
* should be queued by the operating system.
*/
* when no signals will be processed, but during that time they
* should be queued by the operating system.
*/
- if (pthread_equal(GC_thread, pthread_self()))
- sigtrick = ctdl_thread_internal_block_signals(&old_signal_set) == 0;
+// if (pthread_equal(GC_thread, pthread_self()))
+// sigtrick = ctdl_thread_internal_block_signals(&old_signal_set) == 0;
/*
* We pass this_thread into the thread as its args so that it can find out information
/*
* We pass this_thread into the thread as its args so that it can find out information
pthread_cond_destroy(&(this_thread->SleepCond));
pthread_attr_destroy(&this_thread->attr);
free(this_thread);
pthread_cond_destroy(&(this_thread->SleepCond));
pthread_attr_destroy(&this_thread->attr);
free(this_thread);
- if (sigtrick)
- ctdl_thread_internal_restore_signals(&old_signal_set);
+// if (sigtrick)
+// ctdl_thread_internal_restore_signals(&old_signal_set);
- if (sigtrick)
- ctdl_thread_internal_restore_signals(&old_signal_set);
+// if (sigtrick)
+// ctdl_thread_internal_restore_signals(&old_signal_set);
num_threads++; // Increase the count of threads in the system.
if(this_thread->flags & CTDLTHREAD_WORKER)
num_threads++; // Increase the count of threads in the system.
if(this_thread->flags & CTDLTHREAD_WORKER)