diff options
author | Chris Cleeland <chris.cleeland@gmail.com> | 1998-01-09 16:01:16 +0000 |
---|---|---|
committer | Chris Cleeland <chris.cleeland@gmail.com> | 1998-01-09 16:01:16 +0000 |
commit | 818c3c34735cb086a8547c9e6ef7e7037ee088b9 (patch) | |
tree | fbe59bfc1421c86e92254733b4467b395b5fb9d3 | |
parent | 10fedbec6429a807c1ee52c69f85c5d596087905 (diff) | |
download | ATCD-818c3c34735cb086a8547c9e6ef7e7037ee088b9.tar.gz |
* tao/orbobj.cpp (run,perform_work): Added code to set the
Reactor's owner to the current thread prior to calling
handle_events(). Thanks to Keith Nicewarner
<knicewar@sanders.com> for his bug reports which led to this
solution.
-rw-r--r-- | TAO/tao/orbobj.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp index 58c689ae416..4800742ae34 100644 --- a/TAO/tao/orbobj.cpp +++ b/TAO/tao/orbobj.cpp @@ -241,7 +241,15 @@ CORBA_ORB::POA_init (int &argc, int CORBA_ORB::perform_work (ACE_Time_Value *tv) { - return TAO_ORB_Core_instance ()->reactor ()->handle_events (tv); + ACE_Reactor *r = TAO_ORB_Core_instance ()->reactor (); + + // Set the owning thread of the Reactor to the one which we're + // currently in. This is necessary b/c it's possible that the + // application is calling us from a thread other than that in which + // the Reactor's CTOR (which sets the owner) was called. + r->owner (ACE_Thread::self ()); + + return r->handle_events (tv); } int @@ -249,6 +257,12 @@ CORBA_ORB::run (ACE_Time_Value *tv) { ACE_Reactor *r = TAO_ORB_Core_instance ()->reactor (); + // Set the owning thread of the Reactor to the one which we're + // currently in. This is necessary b/c it's possible that the + // application is calling us from a thread other than that in which + // the Reactor's CTOR (which sets the owner) was called. + r->owner (ACE_Thread::self ()); + // This method should only be called by servers, so now we set up // for listening! if (this->open () == -1) |