version 1.37, 2003/04/07 20:29:23
|
version 1.38, 2003/04/09 16:28:55
|
|
|
| |
| |
static struct timeval create_time = {0, 1}; | static struct timeval create_time = {0, 1}; |
static struct timeval destroy_time = {15, 0}; |
static struct timeval destroy_time = {300, 0}; |
static struct timeval deadlock_time = {0, 0}; | static struct timeval deadlock_time = {0, 0}; |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
|
|
{ | { |
_thread_pool = new ThreadPool(0, | _thread_pool = new ThreadPool(0, |
"Monitor", | "Monitor", |
1, |
0, |
0, | 0, |
create_time, | create_time, |
destroy_time, | destroy_time, |
|
|
gettimeofday(&now, NULL); | gettimeofday(&now, NULL); |
int dead_threads = 0; | int dead_threads = 0; |
| |
if( now.tv_sec - last.tv_sec > 300 ) |
if( now.tv_sec - last.tv_sec > 120 ) |
{ | { |
gettimeofday(&last, NULL); | gettimeofday(&last, NULL); |
try | try |
{ | { |
|
|
dead_threads = _thread_pool->kill_dead_threads(); | dead_threads = _thread_pool->kill_dead_threads(); |
} | } |
catch(IPCException& ) | catch(IPCException& ) |