TAO_RTCORBA
2.1.2
|
Class representing the thread lane inside a thread pool. More...
#include <Thread_Pool.h>
Class representing the thread lane inside a thread pool.
TAO_Thread_Lane::TAO_Thread_Lane | ( | TAO_Thread_Pool & | pool, |
CORBA::ULong | id, | ||
CORBA::Short | lane_priority, | ||
CORBA::ULong | static_threads, | ||
CORBA::ULong | dynamic_threads, | ||
TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan | lifespan, | ||
ACE_Time_Value const & | dynamic_thread_time | ||
) |
Constructor.
TAO_Thread_Lane::~TAO_Thread_Lane | ( | void | ) |
Destructor.
|
private |
Create number_of_threads of dynamic threads. Can be called multiple times.
int TAO_Thread_Lane::create_static_threads | ( | void | ) |
Create the static threads - only called once.
|
private |
CORBA::ULong TAO_Thread_Lane::current_threads | ( | void | ) | const |
|
inline |
|
inline |
void TAO_Thread_Lane::finalize | ( | void | ) |
Finalize the resources.
|
inline |
int TAO_Thread_Lane::is_collocated | ( | const TAO_MProfile & | mprofile | ) |
Does mprofile belong to us?
|
inline |
|
inline |
|
inline |
bool TAO_Thread_Lane::new_dynamic_thread | ( | void | ) |
Called by the TAO_RT_New_Leader_Generator to request a new dynamic thread. It can be that no thread can be created because the number of threads is equal to the maximum we can have or the Thread Lane is shutting down.
true | A new thread is created |
false | No thread could be created |
void TAO_Thread_Lane::open | ( | void | ) |
Open the lane.
|
inline |
|
inline |
void TAO_Thread_Lane::shutdown_reactor | ( | void | ) |
Shutdown the reactor.
void TAO_Thread_Lane::shutting_down | ( | void | ) |
Mark that this lane is shutting down, we then don't create any dynamic threads anymore. When the pool is shutting down the leader follower loop is called which can cause a request to create a new dynamic thread but we shouldn't create a new one.
|
inline |
|
private |
Validate lane's priority and map it to a native value.
void TAO_Thread_Lane::wait | ( | void | ) |
Wait for threads to exit.
|
private |
Array with all dynamic threads.
|
private |
Maximum number of threads we are allowed to create.
|
private |
The id of this lane.
|
mutableprivate |
Lock to guard all members of the lane.
|
private |
The Thread Pool to which this lane belongs.
|
private |
This boolean is set when we are shutting down, then we will not create any new dynamic threads
Array with all static threads.
|
private |
Number of static threads.