| 477 |
unsigned int time_wait = 0; |
unsigned int time_wait = 0; |
| 478 |
|
|
| 479 |
if (!this->IsShutdown()) |
if (!this->IsShutdown()) |
| 480 |
return 1; |
return 0; |
| 481 |
|
|
| 482 |
if (hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)base::Thread,(LPVOID)this,0,&ulThreadId)) |
if (hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)base::Thread,(LPVOID)this,0,&ulThreadId)) |
| 483 |
{ |
{ |
| 494 |
{ |
{ |
| 495 |
Sleep(100); |
Sleep(100); |
| 496 |
time_wait += 100; |
time_wait += 100; |
| 497 |
if (time_wait > 10000) //Wait 10 seconds |
if (time_wait > 30000) //Wait 30 seconds |
| 498 |
{ |
{ |
| 499 |
syslog << logfile::log_head << "Module timeout in begin()" << endl; |
syslog << logfile::log_head << "Module timeout in begin()" << endl; |
| 500 |
this->end(); |
this->end(); |
| 516 |
|
|
| 517 |
p->ulMainThreadId = GetCurrentThreadId(); |
p->ulMainThreadId = GetCurrentThreadId(); |
| 518 |
|
|
| 519 |
if (p->GetParentThread()->GetThreadPool()->AddThread(GetCurrentThreadId(), CLOCKS_PER_SEC * 30) != 0) |
if (p->GetParentThread()->GetThreadPool()->AddThread(GetCurrentThreadId(), CLOCKS_PER_SEC * 60) != 0) |
| 520 |
{ |
{ |
| 521 |
syslog << logfile::log_head << "Register thread ... Failed" << endl; |
syslog << logfile::log_head << "Register thread ... Failed" << endl; |
| 522 |
} |
} |