diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-09-10 05:10:26 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-09-10 05:10:26 +0000 |
commit | e1b67a17474e34b1b958b699d92bbff505ee1791 (patch) | |
tree | 1d28915e8cba5a48c14ef333d773bd41d4d96631 /tests/Reactors_Test.cpp | |
parent | 380240276f67357d408640d39940a55f6b677ff2 (diff) | |
download | ATCD-e1b67a17474e34b1b958b699d92bbff505ee1791.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/Reactors_Test.cpp')
-rw-r--r-- | tests/Reactors_Test.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
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 */ |