summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLogs/ChangeLog-02a11
-rw-r--r--ChangeLogs/ChangeLog-03a11
-rw-r--r--ace/TP_Reactor.cpp21
-rw-r--r--ace/TP_Reactor.h9
5 files changed, 63 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b17f1ab4a9c..c3726442b3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Fri Aug 4 15:53:27 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * ace/TP_Reactor.h:
+ * ace/TP_Reactor.cpp:
+ The owner_ field has no effect in the TP reactor, but setting it
+ or checking its value wakes up the leader thread. This can
+ result in performance problems for applications that use both TP
+ and regular reactors, such as TAO.
+ Thanks to Brian Wright <bwright@paladyne.com> for detecting the
+ problem and putting us in the right track to solve it.
+
Thu Aug 3 17:50:39 2000 Carlos O'Ryan <coryan@uci.edu>
* THANKS:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index b17f1ab4a9c..c3726442b3d 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,14 @@
+Fri Aug 4 15:53:27 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * ace/TP_Reactor.h:
+ * ace/TP_Reactor.cpp:
+ The owner_ field has no effect in the TP reactor, but setting it
+ or checking its value wakes up the leader thread. This can
+ result in performance problems for applications that use both TP
+ and regular reactors, such as TAO.
+ Thanks to Brian Wright <bwright@paladyne.com> for detecting the
+ problem and putting us in the right track to solve it.
+
Thu Aug 3 17:50:39 2000 Carlos O'Ryan <coryan@uci.edu>
* THANKS:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index b17f1ab4a9c..c3726442b3d 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,14 @@
+Fri Aug 4 15:53:27 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * ace/TP_Reactor.h:
+ * ace/TP_Reactor.cpp:
+ The owner_ field has no effect in the TP reactor, but setting it
+ or checking its value wakes up the leader thread. This can
+ result in performance problems for applications that use both TP
+ and regular reactors, such as TAO.
+ Thanks to Brian Wright <bwright@paladyne.com> for detecting the
+ problem and putting us in the right track to solve it.
+
Thu Aug 3 17:50:39 2000 Carlos O'Ryan <coryan@uci.edu>
* THANKS:
diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp
index 202c4cd845a..91f8dcff381 100644
--- a/ace/TP_Reactor.cpp
+++ b/ace/TP_Reactor.cpp
@@ -64,6 +64,27 @@ ACE_TP_Reactor::notify_handle (ACE_EH_Dispatch_Info &dispatch_info)
this->resume_handler (handle) : 0);
}
+int
+ACE_TP_Reactor::owner (ACE_thread_t, ACE_thread_t *o_id)
+{
+ ACE_TRACE ("ACE_TP_Reactor::owner");
+ if (o_id)
+ *o_id = ACE_Thread::self ();
+
+ return 0;
+
+}
+
+int
+ACE_TP_Reactor::owner (ACE_thread_t *t_id)
+{
+ ACE_TRACE ("ACE_TP_Reactor::owner");
+ *t_id = ACE_Thread::self ();
+
+ return 0;
+
+}
+
// Overwrites ACE_Select_Reactor::dispatch_io_set() to *not* dispatch
// any event handlers. The information of one activated event handler
// is stored away, so that the event handler can be dispatch later.
diff --git a/ace/TP_Reactor.h b/ace/TP_Reactor.h
index 49b871018f3..244a20a64c8 100644
--- a/ace/TP_Reactor.h
+++ b/ace/TP_Reactor.h
@@ -162,6 +162,15 @@ public:
virtual void wakeup_all_threads (void);
// Wake up all threads in waiting in the event loop
+ // = Any thread can perform a <handle_events>, override the owner()
+ // methods to avoid the overhead of setting the owner thread.
+
+ virtual int owner (ACE_thread_t n_id, ACE_thread_t *o_id = 0);
+ // Set the new owner of the thread and return the old owner.
+
+ virtual int owner (ACE_thread_t *);
+ // Return the current owner of the thread.
+
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.