/[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.10 by sysadm, Fri Apr 11 17:14:49 2008 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innbbsd                                     */  /*  LeafOK Innbbsd                                     */
 /*  Copyright (C) LeafOK.com, 2003-2005                */  
4  /*                                                     */  /*                                                     */
5  /*  Programmed by Leaf                                 */  /*  Copyright (C) LeafOK.com, 2003-2008                */
 /*  E-mail:leaflet@leafok.com  QQ:6049044              */  
6  /*                                                     */  /*                                                     */
7  /*  http://bbs.leafok.com                              */  /*  http://www.leafok.com                              */
 /*  http://bbs.leafok.net                              */  
 /*  http://bbs.fenglin.info                            */  
8  /*                                                     */  /*                                                     */
9  /*******************************************************/  /*******************************************************/
10    
# Line 229  DWORD thread_pool::KillDeadThread(LPVOID Line 225  DWORD thread_pool::KillDeadThread(LPVOID
225                                          // Remove dead thread from thread pool                                          // Remove dead thread from thread pool
226                                          if (p->RemoveThread(ulThreadId) != 0)                                          if (p->RemoveThread(ulThreadId) != 0)
227                                          {                                          {
228                                                  syslog << logfile::log_head << "Unregister thread ... Failed" << endl;                                                  syslog << logfile::log_head << "Unregister thread (" << ulThreadId << ") ... Failed" << endl;
229                                          }                                          }
230                                          // Kill dead thread                                          // Kill dead thread
231                                          if ((hThread = OpenThread(THREAD_TERMINATE,FALSE,ulThreadId)) == NULL)                                          if ((hThread = OpenThread(THREAD_TERMINATE,FALSE,ulThreadId)) == NULL)
# Line 240  DWORD thread_pool::KillDeadThread(LPVOID Line 236  DWORD thread_pool::KillDeadThread(LPVOID
236                                          {                                          {
237                                                  if (TerminateThread(hThread,-1))                                                  if (TerminateThread(hThread,-1))
238                                                  {                                                  {
239                                                          syslog << logfile::log_head << "Terminate dead thread ... OK" << endl;                                                          syslog << logfile::log_head << "Terminate dead thread (" << ulThreadId << ") ... OK" << endl;
240                                                  }                                                  }
241                                                  else                                                  else
242                                                  {                                                  {
243                                                          syslog << logfile::log_head << "Terminate dead thread ... Failed" << endl;                                                          syslog << logfile::log_head << "Terminate dead thread (" << ulThreadId << ") ... Failed" << endl;
244                                                  }                                                  }
245                                                  CloseHandle(hThread);                                                  CloseHandle(hThread);
246                                          }                                          }
# Line 363  int thread_pool::KillAllThread(void) Line 359  int thread_pool::KillAllThread(void)
359                          {                          {
360                                  if (TerminateThread(hThread,-1))                                  if (TerminateThread(hThread,-1))
361                                  {                                  {
362                                          syslog << logfile::log_head << "Terminate all thread ... OK" << endl;                                          syslog << logfile::log_head << "Terminate all thread (" << ulThreadId << ") ... OK" << endl;
363                                  }                                  }
364                                  else                                  else
365                                  {                                  {
366                                          syslog << logfile::log_head << "Terminate all thread ... Failed" << endl;                                          syslog << logfile::log_head << "Terminate all thread (" << ulThreadId << ") ... Failed" << endl;
367                                  }                                  }
368                                  CloseHandle(hThread);                                  CloseHandle(hThread);
369                          }                          }


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

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