summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2005-04-14 19:58:14 +0000
committerSteve Huston <shuston@riverace.com>2005-04-14 19:58:14 +0000
commita7a95ac9059d8289b1e9a9d5326f91d4ef45fedf (patch)
tree8a9a85121e757f9a883f4a3f93f60e5dd659a0ac
parent7344936b3a78d02196ebebac421c21849fa8d800 (diff)
downloadATCD-a7a95ac9059d8289b1e9a9d5326f91d4ef45fedf.tar.gz
ChangeLogTag:Thu Apr 14 15:25:31 2005 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog14
-rwxr-xr-xexamples/Reactor/WFMO_Reactor/run_test.pl1
-rw-r--r--tests/Priority_Reactor_Test.cpp18
-rw-r--r--tests/Reactor_Notify_Test.cpp6
4 files changed, 28 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f926ba6265..687286a6833 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Thu Apr 14 15:25:31 2005 Steve Huston <shuston@riverace.com>
+
+ * examples/Reactor/WFMO_Reactor/run_test.pl: Removed the "require
+ Process" line - it tried to refer to the one in $ACE_ROOT/bin, which
+ was removed:
+ Mon Apr 4 11:20:08 2005 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * tests/Priority_Reactor_Test.cpp (run_main):
+ * tests/Reactor_Notify_Test.cpp (run_test): Use the ACE_Reactor's
+ delete_implementation setting to delete any created reactor
+ implementation instead of using separate auto_ptr objects for the
+ ACE_Reactor and its implementation. Prevents destruction
+ order issues if the implementation is destroyed first.
+
Thu Apr 14 09:21:14 2005 Chad Elliott <elliott_c@ociweb.com>
* bin/MakeProjectCreator/config/taoidldefaults.mpb:
diff --git a/examples/Reactor/WFMO_Reactor/run_test.pl b/examples/Reactor/WFMO_Reactor/run_test.pl
index a629bf32b51..cc445c64043 100755
--- a/examples/Reactor/WFMO_Reactor/run_test.pl
+++ b/examples/Reactor/WFMO_Reactor/run_test.pl
@@ -5,7 +5,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-require Process;
use lib '../../../bin';
use PerlACE::Run_Test;
diff --git a/tests/Priority_Reactor_Test.cpp b/tests/Priority_Reactor_Test.cpp
index 62b0c5ae5f4..0f1253c211d 100644
--- a/tests/Priority_Reactor_Test.cpp
+++ b/tests/Priority_Reactor_Test.cpp
@@ -271,23 +271,24 @@ run_main (int argc, ACE_TCHAR *argv[])
ACE_NOTREACHED (break);
}
- // Manage memory automagically.
- // Note: This ordering is very subtle...
- auto_ptr<ACE_Reactor> reactor;
- auto_ptr<ACE_Select_Reactor> impl;
+ // Manage Reactor memory automagically.
+ // Note: If opt_priority_reactor is false, the default ACE_Reactor is used
+ // and we don't need to set one up.
+ ACE_Reactor *orig_reactor = 0;
+ auto_ptr<ACE_Reactor> reactor;
if (opt_priority_reactor)
{
ACE_Select_Reactor *impl_ptr;
ACE_NEW_RETURN (impl_ptr, ACE_Priority_Reactor, -1);
auto_ptr<ACE_Select_Reactor> auto_impl (impl_ptr);
- impl = auto_impl;
ACE_Reactor *reactor_ptr;
- ACE_NEW_RETURN (reactor_ptr, ACE_Reactor (impl_ptr), -1);
+ ACE_NEW_RETURN (reactor_ptr, ACE_Reactor (impl_ptr, 1), -1);
+ auto_impl.release (); // ACE_Reactor dtor will take it from here
auto_ptr<ACE_Reactor> auto_reactor (reactor_ptr);
reactor = auto_reactor;
- ACE_Reactor::instance (reactor_ptr);
+ orig_reactor = ACE_Reactor::instance (reactor_ptr);
}
Read_Handler::set_countdown (opt_nchildren);
@@ -387,6 +388,9 @@ run_main (int argc, ACE_TCHAR *argv[])
// We aborted on the previous #ifdef
#endif /* ACE_HAS_THREADS */
+ if (orig_reactor != 0)
+ ACE_Reactor::instance (orig_reactor);
+
ACE_END_TEST;
return 0;
}
diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp
index 2b2a41790fb..115712ad4b4 100644
--- a/tests/Reactor_Notify_Test.cpp
+++ b/tests/Reactor_Notify_Test.cpp
@@ -285,15 +285,14 @@ run_test (int disable_notify_pipe,
ACE_Reactor *reactor;
ACE_NEW_RETURN (reactor,
- ACE_Reactor (reactor_impl),
+ ACE_Reactor (reactor_impl, 1), // Delete implementation
-1);
// Make sure this stuff gets cleaned up when this function exits.
auto_ptr<ACE_Reactor> r (reactor);
- auto_ptr<ACE_Select_Reactor> ri (reactor_impl);
// Set the Singleton Reactor.
- ACE_Reactor::instance (reactor);
+ ACE_Reactor *orig_reactor = ACE_Reactor::instance (reactor);
ACE_ASSERT (ACE_LOG_MSG->op_status () != -1);
ACE_ASSERT (ACE_Reactor::instance () == reactor);
@@ -356,6 +355,7 @@ run_test (int disable_notify_pipe,
ACE_TEXT ("(%t) releasing supplier task thread\n")));
task.release ();
}
+ ACE_Reactor::instance (orig_reactor);
return 0;
}