From ba2488448b54975d2d00a398daab619acc8d5361 Mon Sep 17 00:00:00 2001 From: schmidt Date: Mon, 6 Jan 1997 22:40:39 +0000 Subject: My Dog --- tests/Reactors_Test.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/Reactors_Test.cpp') diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index 42de847e165..c847e557ddb 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -104,8 +104,16 @@ Test_Task::svc (void) { ACE_OS::thr_yield (); - if (r_->notify (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); + // Only wait up to 10 milliseconds to notify the Reactor. + ACE_Time_Value timeout (0, 10 * 1000); + + if (r_->notify (this, ACE_Event_Handler::READ_MASK, &timeout) == -1) + { + if (errno == ETIME) + ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", "notify() timed out")); + else + ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); + } } return 0; -- cgit v1.2.1