#include <Thread_Pool.h>
Inheritance diagram for TAO_Dynamic_Thread_Pool_Threads:
Public Member Functions | |
TAO_Dynamic_Thread_Pool_Threads (TAO_Thread_Lane &lane) | |
Constructor. | |
Protected Member Functions | |
virtual int | run (TAO_ORB_Core &orb_core) |
Do the real work. |
Definition at line 104 of file Thread_Pool.h.
|
Constructor.
Definition at line 98 of file Thread_Pool.cpp.
00099 : TAO_Thread_Pool_Threads (lane) 00100 { 00101 } |
|
Do the real work.
Reimplemented from TAO_Thread_Pool_Threads. Definition at line 104 of file Thread_Pool.cpp. References ACE_DEBUG, ACE_TEXT, TAO_Thread_Lane::dynamic_thread_idle_timeout(), TAO_ORB_Core::has_shutdown(), TAO_Thread_Lane::id(), LM_DEBUG, TAO_ORB_Core::orb(), TAO_debug_level, and ACE_Task_Base::thr_count().
00105 { 00106 CORBA::ORB_ptr orb = orb_core.orb (); 00107 00108 if (this->lane_.dynamic_thread_idle_timeout () == ACE_Time_Value::zero) 00109 { 00110 // No timeout specified, run the ORB until it shutdowns 00111 orb->run (); 00112 } 00113 else 00114 { 00115 // A timeout is specified, run the ORB in an idle loop, if we 00116 // don't handle any operations for the given timeout we just 00117 // exit the loop and this thread ends itself. 00118 ACE_Time_Value tv (this->lane_.dynamic_thread_idle_timeout ()); 00119 while (!orb_core.has_shutdown () && orb->work_pending (tv)) 00120 { 00121 orb->perform_work (); 00122 tv = this->lane_.dynamic_thread_idle_timeout (); 00123 } 00124 00125 if (TAO_debug_level > 7) 00126 ACE_DEBUG ((LM_DEBUG, 00127 ACE_TEXT ("TAO Process %P Pool %d Lane %d Thread %t\n") 00128 ACE_TEXT ("Current number of dynamic threads left = %d; ") 00129 ACE_TEXT ("RTCorba worker thread is ending!\n"), 00130 this->lane_.pool ().id (), 00131 this->lane_.id (), 00132 this->thr_count () - 1)); 00133 } 00134 00135 return 0; 00136 } |