diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 00:31:01 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 00:31:01 +0000 |
commit | 26cc648074ee0381ecc7efba994b195c886769ed (patch) | |
tree | aa80f84b28a36b60c35aa6bd732ae76481610109 | |
parent | fee96ebe2dbd8f66649bea65e8c9c73f96152a33 (diff) | |
download | ATCD-26cc648074ee0381ecc7efba994b195c886769ed.tar.gz |
Sun Jun 8 19:53:04 2003 Pradeep Gore <pradeep@oomworks.com
-rw-r--r-- | TAO/orbsvcs/Notify_Service/Notify_Service.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp index 94b91b37409..2dcf4b70e0f 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp @@ -14,13 +14,13 @@ TAO_Notify_Service_Driver::TAO_Notify_Service_Driver (void) : notify_service_ (0), - bootstrap_ (0), + bootstrap_ (0), use_name_svc_ (1), ior_output_file_ (0), notify_factory_name_ (NOTIFY_KEY), notify_channel_name_ (NOTIFY_CHANNEL_NAME), register_event_channel_ (0), - nthreads_ (0) + nthreads_ (1) { // No-Op. } @@ -102,7 +102,13 @@ TAO_Notify_Service_Driver::init (int argc, ACE_TCHAR *argv[] ACE_DEBUG ((LM_DEBUG, "Running %d server threads\n", this->nthreads_)); worker_.orb (this->orb_.in ()); - if (worker_.activate (THR_NEW_LWP | THR_JOINABLE, + // Task activation flags. + long flags = + THR_NEW_LWP | + THR_JOINABLE | + this->orb_->orb_core ()->orb_params ()->thread_creation_flags (); + + if (worker_.activate (flags, this->nthreads_) != 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), -1); @@ -444,6 +450,18 @@ Worker::orb (CORBA::ORB_ptr orb) int Worker::svc (void) { + ACE_hthread_t current; + ACE_Thread::self (current); + + int priority; + if (ACE_Thread::getprio (current, priority) == -1) + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - Failed to get Worker thread priority\n"))); + return -1; + } + + ACE_DEBUG ((LM_ERROR, "Activated Worker Thread to tun the ORB @ priority:%d \n", priority)); + ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { |