TAO_RTCORBA 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TAO_Thread_Lane Class Reference

Class representing the thread lane inside a thread pool. More...

#include <Thread_Pool.h>

Collaboration diagram for TAO_Thread_Lane:
Collaboration graph
[legend]

Public Member Functions

 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 ()
 Destructor.
 
void open ()
 Open the lane.
 
void finalize ()
 Finalize the resources.
 
void shutdown_reactor ()
 Shutdown the reactor.
 
void wait ()
 Wait for threads to exit.
 
int is_collocated (const TAO_MProfile &mprofile)
 Does mprofile belong to us?
 
int create_static_threads ()
 Create the static threads - only called once.
 
void shutting_down ()
 
bool new_dynamic_thread ()
 

Accessors

TAO_Thread_Poolpool_
 The Thread Pool to which this lane belongs.
 
CORBA::ULong const id_
 The id of this lane.
 
CORBA::Short lane_priority_
 The Thread Pool to which this lane belongs.
 
bool shutdown_
 
CORBA::ULong const static_threads_number_
 Number of static threads.
 
CORBA::ULong const dynamic_threads_number_
 Maximum number of threads we are allowed to create.
 
TAO_Thread_Pool_Threads static_threads_
 Array with all static threads.
 
TAO_Dynamic_Thread_Pool_Threads dynamic_threads_
 Array with all dynamic threads.
 
TAO_RT_New_Leader_Generator new_thread_generator_
 The Thread Pool to which this lane belongs.
 
TAO_Thread_Lane_Resources resources_
 The Thread Pool to which this lane belongs.
 
CORBA::Short native_priority_
 The Thread Pool to which this lane belongs.
 
TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan const lifespan_
 The Thread Pool to which this lane belongs.
 
ACE_Time_Value const dynamic_thread_time_
 The Thread Pool to which this lane belongs.
 
TAO_SYNCH_MUTEX lock_
 Lock to guard all members of the lane.
 
TAO_Thread_Poolpool () const
 The Thread Pool to which this lane belongs.
 
CORBA::ULong id () const
 The Thread Pool to which this lane belongs.
 
CORBA::Short lane_priority () const
 The Thread Pool to which this lane belongs.
 
CORBA::ULong static_threads () const
 The Thread Pool to which this lane belongs.
 
CORBA::ULong dynamic_threads () const
 The Thread Pool to which this lane belongs.
 
CORBA::ULong current_threads () const
 The Thread Pool to which this lane belongs.
 
CORBA::Short native_priority () const
 The Thread Pool to which this lane belongs.
 
TAO_Thread_Lane_Resourcesresources ()
 The Thread Pool to which this lane belongs.
 
TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan lifespan () const
 The Thread Pool to which this lane belongs.
 
ACE_Time_Value const & dynamic_thread_time () const
 The Thread Pool to which this lane belongs.
 
void validate_and_map_priority ()
 Validate lane's priority and map it to a native value.
 
int create_threads_i (TAO_Thread_Pool_Threads &thread_pool, CORBA::ULong number_of_threads, long thread_flags)
 The Thread Pool to which this lane belongs.
 
int create_dynamic_threads (CORBA::ULong number_of_threads)
 

Detailed Description

Class representing the thread lane inside a thread pool.

Constructor & Destructor Documentation

◆ TAO_Thread_Lane()

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::~TAO_Thread_Lane ( )

Destructor.

Member Function Documentation

◆ create_dynamic_threads()

int TAO_Thread_Lane::create_dynamic_threads ( CORBA::ULong number_of_threads)
private

Create number_of_threads of dynamic threads. Can be called multiple times.

◆ create_static_threads()

int TAO_Thread_Lane::create_static_threads ( )

Create the static threads - only called once.

◆ create_threads_i()

int TAO_Thread_Lane::create_threads_i ( TAO_Thread_Pool_Threads & thread_pool,
CORBA::ULong number_of_threads,
long thread_flags )
private

The Thread Pool to which this lane belongs.

◆ current_threads()

CORBA::ULong TAO_Thread_Lane::current_threads ( ) const

The Thread Pool to which this lane belongs.

◆ dynamic_thread_time()

ACE_Time_Value const & TAO_Thread_Lane::dynamic_thread_time ( ) const
inline

The Thread Pool to which this lane belongs.

◆ dynamic_threads()

CORBA::ULong TAO_Thread_Lane::dynamic_threads ( ) const
inline

The Thread Pool to which this lane belongs.

◆ finalize()

void TAO_Thread_Lane::finalize ( )

Finalize the resources.

◆ id()

CORBA::ULong TAO_Thread_Lane::id ( ) const
inline

The Thread Pool to which this lane belongs.

◆ is_collocated()

int TAO_Thread_Lane::is_collocated ( const TAO_MProfile & mprofile)

Does mprofile belong to us?

◆ lane_priority()

CORBA::Short TAO_Thread_Lane::lane_priority ( ) const
inline

The Thread Pool to which this lane belongs.

◆ lifespan()

TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan TAO_Thread_Lane::lifespan ( ) const
inline

The Thread Pool to which this lane belongs.

◆ native_priority()

CORBA::Short TAO_Thread_Lane::native_priority ( ) const
inline

The Thread Pool to which this lane belongs.

◆ new_dynamic_thread()

bool TAO_Thread_Lane::new_dynamic_thread ( )

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.

Return values
trueA new thread is created
falseNo thread could be created

◆ open()

void TAO_Thread_Lane::open ( )

Open the lane.

◆ pool()

TAO_Thread_Pool & TAO_Thread_Lane::pool ( ) const
inline

The Thread Pool to which this lane belongs.

◆ resources()

TAO_Thread_Lane_Resources & TAO_Thread_Lane::resources ( )
inline

The Thread Pool to which this lane belongs.

◆ shutdown_reactor()

void TAO_Thread_Lane::shutdown_reactor ( )

Shutdown the reactor.

◆ shutting_down()

void TAO_Thread_Lane::shutting_down ( )

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.

◆ static_threads()

CORBA::ULong TAO_Thread_Lane::static_threads ( ) const
inline

The Thread Pool to which this lane belongs.

◆ validate_and_map_priority()

void TAO_Thread_Lane::validate_and_map_priority ( )
private

Validate lane's priority and map it to a native value.

◆ wait()

void TAO_Thread_Lane::wait ( )

Wait for threads to exit.

Member Data Documentation

◆ dynamic_thread_time_

ACE_Time_Value const TAO_Thread_Lane::dynamic_thread_time_
private

The Thread Pool to which this lane belongs.

◆ dynamic_threads_

TAO_Dynamic_Thread_Pool_Threads TAO_Thread_Lane::dynamic_threads_
private

Array with all dynamic threads.

◆ dynamic_threads_number_

CORBA::ULong const TAO_Thread_Lane::dynamic_threads_number_
private

Maximum number of threads we are allowed to create.

◆ id_

CORBA::ULong const TAO_Thread_Lane::id_
private

The id of this lane.

◆ lane_priority_

CORBA::Short TAO_Thread_Lane::lane_priority_
private

The Thread Pool to which this lane belongs.

◆ lifespan_

TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan const TAO_Thread_Lane::lifespan_
private

The Thread Pool to which this lane belongs.

◆ lock_

TAO_SYNCH_MUTEX TAO_Thread_Lane::lock_
mutableprivate

Lock to guard all members of the lane.

◆ native_priority_

CORBA::Short TAO_Thread_Lane::native_priority_
private

The Thread Pool to which this lane belongs.

◆ new_thread_generator_

TAO_RT_New_Leader_Generator TAO_Thread_Lane::new_thread_generator_
private

The Thread Pool to which this lane belongs.

◆ pool_

TAO_Thread_Pool& TAO_Thread_Lane::pool_
private

The Thread Pool to which this lane belongs.

◆ resources_

TAO_Thread_Lane_Resources TAO_Thread_Lane::resources_
private

The Thread Pool to which this lane belongs.

◆ shutdown_

bool TAO_Thread_Lane::shutdown_
private

This boolean is set when we are shutting down, then we will not create any new dynamic threads

◆ static_threads_

TAO_Thread_Pool_Threads TAO_Thread_Lane::static_threads_
private

Array with all static threads.

◆ static_threads_number_

CORBA::ULong const TAO_Thread_Lane::static_threads_number_
private

Number of static threads.


The documentation for this class was generated from the following files: