#include <Thread_Pool.h>
Inheritance diagram for TAO_Thread_Pool_Threads:
Public Member Functions | |
TAO_Thread_Pool_Threads (TAO_Thread_Lane &lane) | |
Constructor. | |
int | svc (void) |
Method executed when a thread is spawned. | |
TAO_Thread_Lane & | lane (void) const |
Accessor to the lane to which this thread belongs to. | |
Static Public Member Functions | |
void | set_tss_resources (TAO_ORB_Core &orb_core, TAO_Thread_Lane &thread_lane) |
Set TSS resources for the current thread. | |
Protected Member Functions | |
virtual int | run (TAO_ORB_Core &orb_core) |
Do the real work. | |
Protected Attributes | |
TAO_Thread_Lane & | lane_ |
Lane to which this thread belongs to. |
Definition at line 71 of file Thread_Pool.h.
|
Constructor.
Definition at line 40 of file Thread_Pool.cpp.
|
|
Accessor to the lane to which this thread belongs to.
Definition at line 9 of file Thread_Pool.inl. Referenced by svc().
00010 { 00011 return this->lane_; 00012 } |
|
Do the real work.
Reimplemented in TAO_Dynamic_Thread_Pool_Threads. Definition at line 76 of file Thread_Pool.cpp. References TAO_ORB_Core::orb(). Referenced by svc().
00077 { 00078 CORBA::ORB_ptr orb = orb_core.orb (); 00079 00080 // Run the ORB. 00081 orb->run (); 00082 00083 return 0; 00084 } |
|
Set TSS resources for the current thread. Get the ORB_Core's TSS resources. Set the lane attribute in TSS. Definition at line 87 of file Thread_Pool.cpp. References TAO_ORB_Core::get_tss_resources(), and TAO_ORB_Core_TSS_Resources::lane_. Referenced by svc().
00089 { 00090 /// Get the ORB_Core's TSS resources. 00091 TAO_ORB_Core_TSS_Resources &tss = 00092 *orb_core.get_tss_resources (); 00093 00094 /// Set the lane attribute in TSS. 00095 tss.lane_ = &thread_lane; 00096 } |
|
Method executed when a thread is spawned.
Reimplemented from ACE_Task_Base. Definition at line 47 of file Thread_Pool.cpp. References ACE_ERROR, TAO_ORB_Core::has_shutdown(), lane(), LM_ERROR, TAO_Thread_Pool::manager(), TAO_Thread_Pool_Manager::orb_core(), TAO_Thread_Lane::pool(), run(), and set_tss_resources().
00048 { 00049 TAO_ORB_Core &orb_core = 00050 this->lane ().pool ().manager ().orb_core (); 00051 00052 if (orb_core.has_shutdown ()) 00053 return 0; 00054 00055 // Set TSS resources for this thread. 00056 TAO_Thread_Pool_Threads::set_tss_resources (orb_core, this->lane_); 00057 00058 try 00059 { 00060 // Do the work 00061 this->run (orb_core); 00062 } 00063 catch (const ::CORBA::Exception& ex) 00064 { 00065 // No point propagating this exception. Print it out. 00066 ACE_ERROR ((LM_ERROR, 00067 "orb->run() raised exception for thread %t\n")); 00068 00069 ex._tao_print_exception (""); 00070 } 00071 00072 return 0; 00073 } |
|
Lane to which this thread belongs to.
Definition at line 93 of file Thread_Pool.h. |