/[LeafOK_CVS]/innwebd/thread_pool.cpp
ViewVC logotype

Diff of /innwebd/thread_pool.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 by sysadm, Sat Feb 26 16:10:26 2005 UTC Revision 1.9 by sysadm, Fri May 20 14:34:12 2005 UTC
# Line 229  DWORD thread_pool::KillDeadThread(LPVOID Line 229  DWORD thread_pool::KillDeadThread(LPVOID
229                                          // Remove dead thread from thread pool                                          // Remove dead thread from thread pool
230                                          if (p->RemoveThread(ulThreadId) != 0)                                          if (p->RemoveThread(ulThreadId) != 0)
231                                          {                                          {
232                                                  syslog << logfile::log_head << "Unregister thread ... Failed" << endl;                                                  syslog << logfile::log_head << "Unregister thread (" << ulThreadId << ") ... Failed" << endl;
233                                          }                                          }
234                                          // Kill dead thread                                          // Kill dead thread
235                                          if ((hThread = OpenThread(THREAD_TERMINATE,FALSE,ulThreadId)) == NULL)                                          if ((hThread = OpenThread(THREAD_TERMINATE,FALSE,ulThreadId)) == NULL)
# Line 240  DWORD thread_pool::KillDeadThread(LPVOID Line 240  DWORD thread_pool::KillDeadThread(LPVOID
240                                          {                                          {
241                                                  if (TerminateThread(hThread,-1))                                                  if (TerminateThread(hThread,-1))
242                                                  {                                                  {
243                                                          syslog << logfile::log_head << "Terminate dead thread ... OK" << endl;                                                          syslog << logfile::log_head << "Terminate dead thread (" << ulThreadId << ") ... OK" << endl;
244                                                  }                                                  }
245                                                  else                                                  else
246                                                  {                                                  {
247                                                          syslog << logfile::log_head << "Terminate dead thread ... Failed" << endl;                                                          syslog << logfile::log_head << "Terminate dead thread (" << ulThreadId << ") ... Failed" << endl;
248                                                  }                                                  }
249                                                  CloseHandle(hThread);                                                  CloseHandle(hThread);
250                                          }                                          }
# Line 363  int thread_pool::KillAllThread(void) Line 363  int thread_pool::KillAllThread(void)
363                          {                          {
364                                  if (TerminateThread(hThread,-1))                                  if (TerminateThread(hThread,-1))
365                                  {                                  {
366                                          syslog << logfile::log_head << "Terminate all thread ... OK" << endl;                                          syslog << logfile::log_head << "Terminate all thread (" << ulThreadId << ") ... OK" << endl;
367                                  }                                  }
368                                  else                                  else
369                                  {                                  {
370                                          syslog << logfile::log_head << "Terminate all thread ... Failed" << endl;                                          syslog << logfile::log_head << "Terminate all thread (" << ulThreadId << ") ... Failed" << endl;
371                                  }                                  }
372                                  CloseHandle(hThread);                                  CloseHandle(hThread);
373                          }                          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1