summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97b5
-rw-r--r--tests/Reactors_Test.cpp15
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index f819910da77..a01831413cb 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,4 +1,7 @@
-Tue Sep 9 04:35:35 1997 Douglas C. Schmidt <schmidt@merengue.cs.wustl.edu>
+Tue Sep 9 23:41:56 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * tests/Reactors_Test.cpp (main): Check to see if wait() returns
+ -1 and then test to see what's gone wrong!
* ace/OS.h: Added a "fake" #define for SIGALRM so that programs
will *compile* on platforms like Chorus. Thanks to Wei Chiang
diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp
index 50d2dba5068..5a5f8d397a9 100644
--- a/tests/Reactors_Test.cpp
+++ b/tests/Reactors_Test.cpp
@@ -24,7 +24,9 @@
#if defined (ACE_HAS_THREADS)
-static const int MAX_TASKS = 20;
+ACE_Thread_Manager *tm;
+
+static const int MAX_TASKS = 5;
class Test_Task : public ACE_Task<ACE_MT_SYNCH>
// = TITLE
@@ -197,6 +199,8 @@ main (int, char *[])
ACE_Service_Config daemon;
ACE_ASSERT (ACE_LOG_MSG->op_status () != -1);
+ tm = ACE_Thread_Manager::instance ();
+
ACE_Reactor *reactor;
ACE_NEW_RETURN (reactor, ACE_Reactor, -1);
@@ -226,12 +230,19 @@ main (int, char *[])
THR_BOUND | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1);
- ACE_Thread_Manager::instance ()->wait ();
+ ACE_DEBUG ((LM_DEBUG, "(%t) starting to wait \n"));
+
+ if (ACE_Thread_Manager::instance ()->wait () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "wait"), -1);
+
+ ACE_DEBUG ((LM_DEBUG, "(%t) all threads are finished \n"));
reactor->close ();
delete reactor;
// Note that the destructor of ACE_Service_Config daemon will close
// down the ACE_Reactor::instance().
+
+ ACE_DEBUG ((LM_DEBUG, "(%t) exiting main\n"));
#else
ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
#endif /* ACE_HAS_THREADS */