#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 74 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 79 of file Thread_Pool.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER. Referenced by svc().
00080 { 00081 CORBA::ORB_ptr orb = orb_core.orb (); 00082 00083 // Run the ORB. 00084 orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); 00085 ACE_CHECK_RETURN (-1); 00086 00087 return 0; 00088 } |
|
Set TSS resources for the current thread. Get the ORB_Core's TSS resources. Set the lane attribute in TSS. Definition at line 91 of file Thread_Pool.cpp. References TAO_ORB_Core::get_tss_resources(), and TAO_ORB_Core_TSS_Resources::lane_. Referenced by svc().
00093 { 00094 /// Get the ORB_Core's TSS resources. 00095 TAO_ORB_Core_TSS_Resources &tss = 00096 *orb_core.get_tss_resources (); 00097 00098 /// Set the lane attribute in TSS. 00099 tss.lane_ = &thread_lane; 00100 } |
|
Method executed when a thread is spawned.
Reimplemented from ACE_Task_Base. Definition at line 47 of file Thread_Pool.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_ENDTRY, ACE_ERROR, ACE_PRINT_EXCEPTION, ACE_TRY_NEW_ENV, 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, 00057 this->lane_); 00058 00059 ACE_TRY_NEW_ENV 00060 { 00061 // Do the work 00062 this->run (orb_core); 00063 } 00064 ACE_CATCHANY 00065 { 00066 // No point propagating this exception. Print it out. 00067 ACE_ERROR ((LM_ERROR, 00068 "orb->run() raised exception for thread %t\n")); 00069 00070 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, 00071 ""); 00072 } 00073 ACE_ENDTRY; 00074 00075 return 0; 00076 } |
|
Lane to which this thread belongs to.
Definition at line 96 of file Thread_Pool.h. |