summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-14 06:59:59 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-14 06:59:59 +0000
commitf3a729af18a3a9a6a88f08e1ebcc271ecf7b56f1 (patch)
tree795b3b42946a6ec103aa24c9e35dc0b43104ee41
parent6416ffa4a145482060ccde6063808fd4e8a96f61 (diff)
downloadATCD-f3a729af18a3a9a6a88f08e1ebcc271ecf7b56f1.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-99c12
-rw-r--r--TAO/tao/ORB.cpp22
-rw-r--r--TAO/tao/ORB.h27
3 files changed, 38 insertions, 23 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 95ad3043d08..8a0ede14392 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,15 @@
+Thu Jan 14 00:52:48 1999 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * tao/ORB.cpp (run): Added a new version of the run() method.
+ This variant takes no timeout parameters and hence does not
+ terminate the event loop if the Reactor returns a 0. This
+ variant is necessary for TAO to work correctly with Reactor
+ implementations such as XtReactor that returns zero even when
+ the timeout does not expire.
+
+ Thanks to JM Strauss <jms97@club-internet.fr> for suggesting
+ this change.
+
Wed Jan 13 14:56:00 1999 Chris Gill <cdgill@cs.wustl.edu>
* orbsvcs/tests/Simulator/Event_Supplier/Event_Sup.cpp
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 97cedca896a..20d1bdc2568 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -316,7 +316,8 @@ CORBA_ORB::perform_work (const ACE_Time_Value &tv)
}
int
-CORBA_ORB::run (ACE_Time_Value *tv)
+CORBA_ORB::run (ACE_Time_Value *tv,
+ int break_on_timeouts)
{
ACE_FUNCTION_TIMEPROBE (TAO_CORBA_ORB_RUN_START);
@@ -372,7 +373,8 @@ CORBA_ORB::run (ACE_Time_Value *tv)
switch (r->handle_events (tv))
{
case 0: // Timed out, so we return to caller.
- result = 0;
+ if (break_on_timeouts)
+ result = 0;
break;
/* NOTREACHED */
case -1: // Something else has gone wrong, so return to caller.
@@ -403,9 +405,21 @@ CORBA_ORB::run (ACE_Time_Value *tv)
}
int
-CORBA_ORB::run (const ACE_Time_Value &tv)
+CORBA_ORB::run (ACE_Time_Value &tv)
+{
+ return this->run (&tv, 1);
+}
+
+int
+CORBA_ORB::run (ACE_Time_Value *tv)
+{
+ return this->run (tv, 1);
+}
+
+int
+CORBA_ORB::run (void)
{
- return this->run ((ACE_Time_Value *) &tv);
+ return this->run (0, 0);
}
CORBA_Object_ptr
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 482069d9d5f..5e16736a0d1 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -872,28 +872,17 @@ public:
// It is platform-specific how the application and ORB arrange to
// use compatible threading primitives.
- int run (ACE_Time_Value *tv = 0);
+ int run (void);
+ int run (ACE_Time_Value &tv);
+ int run (ACE_Time_Value *tv);
// Instructs the ORB to initialize itself and run its event loop in
// the current thread, not returning until the ORB has shut down.
// If an error occurs during initialization or a run-time this
- // method will return -1. If <tv> is non-NULL then if no requests
+ // method will return -1. If <tv> is non-NULL, then if no requests
// arrive at this thread before the timeout elapses we return to the
// caller with a value of 0 (this allows timeouts). Otherwise, if
// we've returned since we've been asked to shut down the value of 1
// is returned.
- //
- // <{Note that this interface differs from the POA specification,
- // which is reproduced below:}>
- //
- // Returns when the ORB has shut down. If called by the main
- // thread, it enables the ORB to perform work using the main
- // thread. Otherwise, it simply waits until the ORB has shut down.
- //
- // This operation can be used instead of perform_work() to give the
- // main thread to the ORB if there are no other activities that need
- // to share the main thread. Even in a pure multi-threaded server,
- // calling run() in the main thread is useful to ensure that the
- // process does not exit until the ORB has been shut down.
void shutdown (CORBA::Boolean wait_for_completion = 0);
// This operation instructs the ORB to shut down. Shutting down the
@@ -957,10 +946,6 @@ public:
// ORB will not normally return OBJECT_NOT_EXIST unless the POA
// reports that fault.
- int run (const ACE_Time_Value &tv);
- // This is the same as the more "standard" <run> method, except that
- // you don't need to put the & in front of <tv>.
-
int preconnect (CORBA::String connections);
// Establish connectsion to each of the comma-separated
// <{host}>:<{port}> combinations specified in <connections>.
@@ -1031,6 +1016,10 @@ protected:
CORBA_Object_ptr resolve_poa_current (void);
// Resolve the POA current.
+ int run (ACE_Time_Value *tv,
+ int break_on_timeouts);
+ // Implements the run routine
+
private:
CORBA_Object_ptr resolve_name_service (ACE_Time_Value *timeout);
// Resolve the name service object reference.