Class representing a static thread running in a thread lane. More...
#include <Thread_Pool.h>
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 | |
static 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. |
Class representing a static thread running in a thread lane.
Definition at line 72 of file Thread_Pool.h.
TAO_Thread_Pool_Threads::TAO_Thread_Pool_Threads | ( | TAO_Thread_Lane & | lane | ) |
Constructor.
Definition at line 40 of file Thread_Pool.cpp.
TAO_Thread_Lane & TAO_Thread_Pool_Threads::lane | ( | void | ) | const |
Accessor to the lane to which this thread belongs to.
Definition at line 9 of file Thread_Pool.inl.
{ return this->lane_; }
int TAO_Thread_Pool_Threads::run | ( | TAO_ORB_Core & | orb_core | ) | [protected, virtual] |
Do the real work.
Reimplemented in TAO_Dynamic_Thread_Pool_Threads.
Definition at line 76 of file Thread_Pool.cpp.
{ CORBA::ORB_ptr orb = orb_core.orb (); // Run the ORB. orb->run (); return 0; }
void TAO_Thread_Pool_Threads::set_tss_resources | ( | TAO_ORB_Core & | orb_core, | |
TAO_Thread_Lane & | thread_lane | |||
) | [static] |
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.
{ /// Get the ORB_Core's TSS resources. TAO_ORB_Core_TSS_Resources &tss = *orb_core.get_tss_resources (); /// Set the lane attribute in TSS. tss.lane_ = &thread_lane; TAO_TSS_Resources::instance ()->rtcorba_current_priority_ = thread_lane.lane_priority (); }
int TAO_Thread_Pool_Threads::svc | ( | void | ) | [virtual] |
Method executed when a thread is spawned.
Reimplemented from ACE_Task_Base.
Definition at line 47 of file Thread_Pool.cpp.
{ TAO_ORB_Core &orb_core = this->lane ().pool ().manager ().orb_core (); if (orb_core.has_shutdown ()) return 0; // Set TSS resources for this thread. TAO_Thread_Pool_Threads::set_tss_resources (orb_core, this->lane_); try { // Do the work this->run (orb_core); } catch (const ::CORBA::Exception& ex) { // No point propagating this exception. Print it out. ACE_ERROR ((LM_ERROR, "orb->run() raised exception for thread %t\n")); ex._tao_print_exception (""); } return 0; }
TAO_Thread_Lane& TAO_Thread_Pool_Threads::lane_ [protected] |
Lane to which this thread belongs to.
Definition at line 94 of file Thread_Pool.h.