diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-17 22:29:00 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-17 22:29:00 +0000 |
commit | 60effb0b7ae54f0294a832c6e93c62d333bcbf06 (patch) | |
tree | 11580a225b79eb14d69acd5bc5010bfc7f476628 | |
parent | 50938a2dc1c63c291a463cb5d29df0bb8047107b (diff) | |
download | ATCD-60effb0b7ae54f0294a832c6e93c62d333bcbf06.tar.gz |
ChangeLogTag:Fri Nov 17 14:24:42 2000 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 16 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 16 | ||||
-rw-r--r-- | include/makeinclude/clean.bor | 9 | ||||
-rw-r--r-- | tests/Reactor_Exceptions_Test.cpp | 63 |
5 files changed, 90 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog index 3f7cb566435..ffbb6981dad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Fri Nov 17 14:24:42 2000 Darrell Brunsch <brunsch@uci.edu> + + * include/makeinclude/clean.bor: + + Added the removal of *Cli.cpp, *Ser.cpp, etc. files which + is the output style of the TAO Param_Test. + + * tests/Reactor_Exceptions_Test.cpp: + + Put the handler in its own scope so it must be cleaned up + before the handler. For whatever reason, it wasn't happening + in the right order before. + + Also changed the exception error to a debug message, since + it really isn't an error. + Fri Nov 17 11:22:08 2000 Carlos O'Ryan <coryan@uci.edu> * include/makeinclude/platform_sunos5_kcc.GNU: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 3f7cb566435..ffbb6981dad 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,19 @@ +Fri Nov 17 14:24:42 2000 Darrell Brunsch <brunsch@uci.edu> + + * include/makeinclude/clean.bor: + + Added the removal of *Cli.cpp, *Ser.cpp, etc. files which + is the output style of the TAO Param_Test. + + * tests/Reactor_Exceptions_Test.cpp: + + Put the handler in its own scope so it must be cleaned up + before the handler. For whatever reason, it wasn't happening + in the right order before. + + Also changed the exception error to a debug message, since + it really isn't an error. + Fri Nov 17 11:22:08 2000 Carlos O'Ryan <coryan@uci.edu> * include/makeinclude/platform_sunos5_kcc.GNU: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 3f7cb566435..ffbb6981dad 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,19 @@ +Fri Nov 17 14:24:42 2000 Darrell Brunsch <brunsch@uci.edu> + + * include/makeinclude/clean.bor: + + Added the removal of *Cli.cpp, *Ser.cpp, etc. files which + is the output style of the TAO Param_Test. + + * tests/Reactor_Exceptions_Test.cpp: + + Put the handler in its own scope so it must be cleaned up + before the handler. For whatever reason, it wasn't happening + in the right order before. + + Also changed the exception error to a debug message, since + it really isn't an error. + Fri Nov 17 11:22:08 2000 Carlos O'Ryan <coryan@uci.edu> * include/makeinclude/platform_sunos5_kcc.GNU: diff --git a/include/makeinclude/clean.bor b/include/makeinclude/clean.bor index d267cf2b3c3..a6865bfc35d 100644 --- a/include/makeinclude/clean.bor +++ b/include/makeinclude/clean.bor @@ -14,6 +14,15 @@ clean: @del ) $(IDLFILES:.idl=S_T.cpp ^ @del ) $(IDLFILES:.idl=S_T.h ^ @del ) $(IDLFILES:.idl=S_T.i ^ +@del ) $(IDLFILES:.idl=Cli.cpp ^ +@del ) $(IDLFILES:.idl=Cli.h ^ +@del ) $(IDLFILES:.idl=Cli.i ^ +@del ) $(IDLFILES:.idl=Ser.cpp ^ +@del ) $(IDLFILES:.idl=Ser.h ^ +@del ) $(IDLFILES:.idl=Ser.i ^ +@del ) $(IDLFILES:.idl=Ser_T.cpp ^ +@del ) $(IDLFILES:.idl=Ser_T.h ^ +@del ) $(IDLFILES:.idl=Ser_T.i ^ @del ) $(RESOURCE) ! clean_$(NAME)~.bat 1> NUL -@clean_$(NAME)~.bat 2> NUL diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp index 355b4c73d36..50282b7d2c7 100644 --- a/tests/Reactor_Exceptions_Test.cpp +++ b/tests/Reactor_Exceptions_Test.cpp @@ -150,11 +150,12 @@ worker (void) for (;;) if (ACE_Reactor::instance ()->handle_events () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT (" (%t) exception return\n")), - 0); + { + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) exception return\n"))); + break; + } - ACE_NOTREACHED (return 0); + return 0; } #endif /* ACE_HAS_EXCEPTIONS */ @@ -172,43 +173,45 @@ main (int argc, ACE_TCHAR *argv[]) ACE_INET_Addr local_addr (port); ACE_INET_Addr remote_addr (port, ACE_DEFAULT_SERVER_HOST); - // Put the <handler> before the <reactor> so that they'll be cleaned - // up in the proper order. - My_Handler handler (local_addr); - My_Reactor reactor; ACE_Reactor::instance (&reactor); - ACE_Thread_Manager *thr_mgr = - ACE_Thread_Manager::instance (); + ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance (); + + { + // Make sure handler gets cleaned up before reactor by putting it in its + // own scope + My_Handler handler (local_addr); - if (ACE_Reactor::instance ()->register_handler - (&handler, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("register_handler")), - -1); + + if (ACE_Reactor::instance ()->register_handler + (&handler, + ACE_Event_Handler::READ_MASK) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("register_handler")), + -1); #if defined (ACE_HAS_THREADS) - thr_mgr->spawn (ACE_THR_FUNC (worker)); + thr_mgr->spawn (ACE_THR_FUNC (worker)); #else - // Need to figure out how to implement this test. - ACE_ERROR ((LM_INFO, - ACE_TEXT ("threads not supported on this platform\n"))); + // Need to figure out how to implement this test. + ACE_ERROR ((LM_INFO, + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ - ACE_SOCK_Dgram dgram (ACE_sap_any_cast (ACE_INET_Addr &)); + ACE_SOCK_Dgram dgram (ACE_sap_any_cast (ACE_INET_Addr &)); - for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) - dgram.send (ACE_TEXT ("Hello"), - sizeof (ACE_TEXT ("Hello")), - remote_addr); - // Barrier to wait for the other thread to return. - thr_mgr->wait (); + for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) + dgram.send (ACE_TEXT ("Hello"), + sizeof (ACE_TEXT ("Hello")), + remote_addr); + // Barrier to wait for the other thread to return. + thr_mgr->wait (); - handler.close (); - dgram.close (); + handler.close (); + dgram.close (); + } ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) exiting main\n"))); |