#include <Thread_Pool.h>
Collaboration diagram for TAO_Thread_Lane:

Accessors | |
| TAO_Thread_Pool & | pool (void) const |
| CORBA::ULong | id (void) const |
| CORBA::Short | lane_priority (void) const |
| CORBA::ULong | static_threads (void) const |
| CORBA::ULong | dynamic_threads (void) const |
| CORBA::ULong | current_threads (void) const |
| CORBA::Short | native_priority (void) const |
| TAO_Thread_Lane_Resources & | resources (void) |
| ACE_Time_Value const & | dynamic_thread_idle_timeout (void) const |
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, ACE_Time_Value const &dynamic_thread_idle_timeout) | |
| Constructor. | |
| ~TAO_Thread_Lane (void) | |
| Destructor. | |
| void | open () |
| Open the lane. | |
| void | finalize (void) |
| Finalize the resources. | |
| void | shutdown_reactor (void) |
| Shutdown the reactor. | |
| void | wait (void) |
| Wait for threads to exit. | |
| int | is_collocated (const TAO_MProfile &mprofile) |
| Does mprofile belong to us? | |
| int | create_static_threads (void) |
| Create the static threads - only called once. | |
| void | shutting_down (void) |
| bool | new_dynamic_thread (void) |
Private Member Functions | |
| 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) |
| int | create_dynamic_threads (CORBA::ULong number_of_threads) |
Private Attributes | |
| TAO_Thread_Pool & | pool_ |
| The Thread Pool to which this lane belongs. | |
| CORBA::ULong const | id_ |
| The id of this lane. | |
| CORBA::Short | lane_priority_ |
| 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_ |
| TAO_Thread_Lane_Resources | resources_ |
| CORBA::Short | native_priority_ |
| ACE_Time_Value const | dynamic_thread_idle_timeout_ |
| ACE_SYNCH_MUTEX | lock_ |
| Lock to guard all members of the lane. | |
|
||||||||||||||||||||||||||||
|
Constructor.
|
|
|
Destructor.
|
|
|
Create number_of_threads of dynamic threads. Can be called multiple times. |
|
|
Create the static threads - only called once.
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Finalize the resources.
|
|
|
|
|
|
Does mprofile belong to us?
|
|
|
|
|
|
|
|
|
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.
|
|
|
Open the lane.
|
|
|
|
|
|
|
|
|
Shutdown the reactor.
|
|
|
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. |
|
|
|
|
|
Validate lane's priority and map it to a native value.
|
|
|
Wait for threads to exit.
|
|
|
|
|
|
Array with all dynamic threads.
|
|
|
Maximum number of threads we are allowed to create.
|
|
|
The id of this lane.
|
|
|
|
|
|
Lock to guard all members of the lane.
|
|
|
|
|
|
|
|
|
The Thread Pool to which this lane belongs.
|
|
|
|
|
|
This boolean is set when we are shutting down, then we will not create any new dynamic threads |
|
|
Array with all static threads.
|
|
|
Number of static threads.
|
1.3.9.1