diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-05 09:52:01 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-05 09:52:01 +0000 |
commit | 7ae1d9fc44a22acd24fa35d566ca867bafd344e4 (patch) | |
tree | e31ea83fb9ecdf5d5f54657b26aa213a96973037 /TAO | |
parent | 15a54900a00cfc94301d477707dd51253983d43c (diff) | |
download | ATCD-7ae1d9fc44a22acd24fa35d566ca867bafd344e4.tar.gz |
ChangeLogTag:Fri Feb 05 03:41:09 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-99c | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp | 39 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.h | 15 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/RT_Task.h | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/ReactorTask.h | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Timer_Module.h | 3 |
7 files changed, 54 insertions, 23 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index acdfc6feb02..93db83dd080 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,14 @@ +Fri Feb 05 03:41:09 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/orbsvcs/Event/Event_Channel.h: + * orbsvcs/orbsvcs/Event/Event_Channel.cpp: + * orbsvcs/orbsvcs/Event/Dispatching_Modules.h: + * orbsvcs/orbsvcs/Event/RT_Task.h: + * orbsvcs/orbsvcs/Event/ReactorTask.h: + * orbsvcs/orbsvcs/Event/Timer_Module.h: + MSVC++ gets really confused by a default argument of the form + Module::Foo::_nil () + Fri Feb 5 02:34:27 1999 Carlos O'Ryan <coryan@cs.wustl.edu> * orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp: diff --git a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h index 9edac9620c6..9818562b9a0 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h +++ b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h @@ -331,8 +331,7 @@ class TAO_ORBSVCS_Export ACE_ES_Dispatch_Queue : public ACE_RT_Task public: ACE_ES_Dispatch_Queue (ACE_ES_Dispatching_Base *dispatching_module, ACE_ES_Notification_Strategy *notification_strategy, - RtecScheduler::Scheduler_ptr scheduler = - RtecScheduler::Scheduler::_nil ()); + RtecScheduler::Scheduler_ptr scheduler); // Stores <dispatching_module> for this->threads_closed. Stores // away <notification_strategy> for this->synch_threads. diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp index de206ac2b81..debcb7bad46 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp @@ -478,10 +478,27 @@ ACE_Push_Consumer_Proxy::shutdown (void) // ************************************************************ +ACE_EventChannel::ACE_EventChannel (RtecScheduler::Scheduler_ptr scheduler, + CORBA::Boolean activate_threads, + u_long type, + TAO_Module_Factory* factory) + : rtu_manager_ (0), + type_ (type), + state_ (INITIAL_STATE), + destroyed_ (0), + handle_generator_ (0), + own_factory_ (0), + module_factory_ (factory) +{ + this->scheduler_ = + RtecScheduler::Scheduler::_duplicate (scheduler); + + this->init (activate_threads); +} + ACE_EventChannel::ACE_EventChannel (CORBA::Boolean activate_threads, u_long type, - TAO_Module_Factory* factory, - RtecScheduler::Scheduler_ptr scheduler) + TAO_Module_Factory* factory) : rtu_manager_ (0), type_ (type), state_ (INITIAL_STATE), @@ -490,21 +507,19 @@ ACE_EventChannel::ACE_EventChannel (CORBA::Boolean activate_threads, own_factory_ (0), module_factory_ (factory) { + this->scheduler_ = + RtecScheduler::Scheduler::_duplicate (ACE_Scheduler_Factory::server ()); + this->init (activate_threads); +} + +void +ACE_EventChannel::init (int activate_threads) +{ if (this->module_factory_ == 0) { this->own_factory_ = 1; ACE_NEW (this->module_factory_, TAO_Default_Module_Factory); } - if (CORBA::is_nil (scheduler)) - { - this->scheduler_ = - RtecScheduler::Scheduler::_duplicate (ACE_Scheduler_Factory::server ()); - } - else - { - this->scheduler_ = - RtecScheduler::Scheduler::_duplicate (scheduler); - } consumer_module_ = this->module_factory_->create_consumer_module (this); diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h index 2de6ec418e6..6199e5cc404 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h @@ -175,13 +175,19 @@ public: ACE_EventChannel (CORBA::Boolean activate_threads = 1, u_long type = ACE_DEFAULT_EVENT_CHANNEL_TYPE, - TAO_Module_Factory* factory = 0, - RtecScheduler::Scheduler_ptr scheduler = - RtecScheduler::Scheduler::_nil ()); + TAO_Module_Factory* factory = 0); + ACE_EventChannel (RtecScheduler::Scheduler_ptr scheduler, + CORBA::Boolean activate_threads = 1, + u_long type = ACE_DEFAULT_EVENT_CHANNEL_TYPE, + TAO_Module_Factory* factory = 0); // Construction of the given <type>. Check the **_CHANNEL // enumerations defined below. // By default we activate the threads on construction, but it is // possible to create the EC first and activate the threads later. + // A factory for the modules can be provided, by default it uses + // TAO_EC_Default_Module_Factory + // If an scheduler is not provided it uses the singleton in + // ACE_Scheduler_Factory. virtual ~ACE_EventChannel (void); // Calls destroy. @@ -274,6 +280,9 @@ public: // ownership of the reference returned. private: + void init (int activate_threads); + // Factor out commonality in the constructor. + void cleanup_observers (void); // Remove all the observers, this simplifies the shutdown process. diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h b/TAO/orbsvcs/orbsvcs/Event/RT_Task.h index 2a847fb2a93..3dd4c16ab04 100644 --- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h +++ b/TAO/orbsvcs/orbsvcs/Event/RT_Task.h @@ -101,8 +101,7 @@ class TAO_ORBSVCS_Export ACE_RT_Task : public ACE_ES_TASK // one thread should be calling any management methods. friend class ACE_RT_Thread_Manager; public: - ACE_RT_Task (RtecScheduler::Scheduler_ptr scheduler = - RtecScheduler::Scheduler::_nil ()); + ACE_RT_Task (RtecScheduler::Scheduler_ptr scheduler); // Default construction. ~ACE_RT_Task (void); diff --git a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h index 8bbdc0b29a3..b2091f49350 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h +++ b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h @@ -38,8 +38,7 @@ public: typedef ACE_Reactor Reactor; #endif /* ACE_OLD_STYLE_REACTOR */ - ACE_ES_Reactor_Task (RtecScheduler::Scheduler_ptr scheduler = - RtecScheduler::Scheduler::_nil ()); + ACE_ES_Reactor_Task (RtecScheduler::Scheduler_ptr scheduler); // Default construction. ~ACE_ES_Reactor_Task (void); diff --git a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h index f667e24cf4c..03039b9dc58 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h +++ b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h @@ -149,8 +149,7 @@ class TAO_ORBSVCS_Export TAO_EC_RPT_Timer_Module : public TAO_EC_Timer_Module // each Reactor runs at a different priority. // public: - TAO_EC_RPT_Timer_Module (RtecScheduler::Scheduler_ptr scheduler = - RtecScheduler::Scheduler::_nil ()); + TAO_EC_RPT_Timer_Module (RtecScheduler::Scheduler_ptr scheduler); // Create the Timer Module virtual ~TAO_EC_RPT_Timer_Module (void); |