diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-12 01:36:28 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-12 01:36:28 +0000 |
commit | cef1d13d2e3ff43857bc32dfb657f7bacbc844bb (patch) | |
tree | 3573523819435c6edf0757d663465dbff42ffa91 | |
parent | 6a433de1aa4f1c0998b76f752c4db6209ad06a5d (diff) | |
download | ATCD-cef1d13d2e3ff43857bc32dfb657f7bacbc844bb.tar.gz |
Minor change
-rw-r--r-- | TAO/tao/RTCORBA/Thread_Pool.cpp | 10 | ||||
-rw-r--r-- | TAO/threadpool-changes | 11 |
2 files changed, 14 insertions, 7 deletions
diff --git a/TAO/tao/RTCORBA/Thread_Pool.cpp b/TAO/tao/RTCORBA/Thread_Pool.cpp index 8c828648571..aba3f630f2d 100644 --- a/TAO/tao/RTCORBA/Thread_Pool.cpp +++ b/TAO/tao/RTCORBA/Thread_Pool.cpp @@ -25,7 +25,15 @@ TAO_RT_New_Leader_Generator::TAO_RT_New_Leader_Generator (TAO_Thread_Lane &lane) void TAO_RT_New_Leader_Generator::no_leaders_available (void) { - if (this->lane_.dynamic_threads () == 0) + // Note that we are checking this condition below without the lock + // held. The value of <static_threads> and <dynamic_threads> does + // not change, but <current_threads> increases when new dynamic + // threads are created. Even if we catch <current_threads> in an + // inconsistent state, we will double check later with the lock + // held. Therefore, this check should not cause any big problems. + if (this->lane_.current_threads () == + this->lane_.static_threads () + + this->lane_.dynamic_threads ()) return; TAO_Thread_Pool_Manager &manager = diff --git a/TAO/threadpool-changes b/TAO/threadpool-changes index e27829feaed..8d60d7bdcca 100644 --- a/TAO/threadpool-changes +++ b/TAO/threadpool-changes @@ -247,12 +247,11 @@ Fri Aug 24 18:08:37 2001 Irfan Pyarali <irfan@cs.wustl.edu> method is called by the leader followers class when it is out of threads to run the event loop. - If this lane has support for dynamic threads, we grab the - Thread Pool Manager lock, check if the current number of - threads in this lane does not exceed the <static> + - <dynamic> number of threads specified by the user. If it - does not exceed <static> + <dynamic>, one dynamic thread - is created. + We grab the Thread Pool Manager lock, check if the current + number of threads in this lane does not exceed the + <static> + <dynamic> number of threads specified by the + user. If it does not exceed <static> + <dynamic>, one + dynamic thread is created. * tao/RTCORBA/RT_Protocols_Hooks.cpp (set_default_server_protocol_policy): Don't include all the |