| 379 |
this->innd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,innd_port,conn_str); |
this->innd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,innd_port,conn_str); |
| 380 |
this->outd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,0,conn_str); |
this->outd.configure(innd_id,innd_name,innd_server,innd_uid,innd_address,0,conn_str); |
| 381 |
|
|
|
base* p_ParentThread; |
|
|
|
|
|
p_ParentThread = new base_active(); |
|
|
|
|
|
this->SetParentThread(p_ParentThread); |
|
|
this->bbsd.SetParentThread(p_ParentThread); |
|
|
this->innd.SetParentThread(p_ParentThread); |
|
|
this->outd.SetParentThread(p_ParentThread); |
|
|
|
|
|
p_ParentThread->SetThreadPool(new thread_pool(TS_MAX_THREAD)); |
|
|
|
|
|
if (p_ParentThread->GetThreadPool()->GetLastError() != 0) |
|
|
{ |
|
|
syslog << logfile::log_head << "Create Thread Pool ... failed" << endl; |
|
|
} |
|
|
|
|
| 382 |
return 0; |
return 0; |
| 383 |
} |
} |
| 384 |
|
|
| 455 |
syslog << logfile::log_head << "End OUTD ... Failed" << endl; |
syslog << logfile::log_head << "End OUTD ... Failed" << endl; |
| 456 |
} |
} |
| 457 |
} |
} |
| 458 |
|
|
| 459 |
|
int controld::InitThreadPool(void) |
| 460 |
|
{ |
| 461 |
|
base* p_ParentThread; |
| 462 |
|
|
| 463 |
|
p_ParentThread = new controld(); |
| 464 |
|
|
| 465 |
|
this->SetParentThread(p_ParentThread); |
| 466 |
|
this->bbsd.SetParentThread(p_ParentThread); |
| 467 |
|
this->innd.SetParentThread(p_ParentThread); |
| 468 |
|
this->outd.SetParentThread(p_ParentThread); |
| 469 |
|
|
| 470 |
|
p_ParentThread->SetThreadPool(new thread_pool(TS_MAX_THREAD)); |
| 471 |
|
|
| 472 |
|
if (p_ParentThread->GetThreadPool()->GetLastError() != 0) |
| 473 |
|
{ |
| 474 |
|
syslog << logfile::log_head << "Create Thread Pool ... failed" << endl; |
| 475 |
|
} |
| 476 |
|
|
| 477 |
|
return 0; |
| 478 |
|
} |
| 479 |
|
|
| 480 |
|
int controld::CleanupThreadPool(void) |
| 481 |
|
{ |
| 482 |
|
delete(this->GetParentThread()); |
| 483 |
|
|
| 484 |
|
return 0; |
| 485 |
|
} |