summaryrefslogtreecommitdiff
path: root/tests/Reactors_Test.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-06 22:40:39 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-06 22:40:39 +0000
commitba2488448b54975d2d00a398daab619acc8d5361 (patch)
tree45885e95294ca80d930ed4f66b7e96e130d62403 /tests/Reactors_Test.cpp
parent70d108545611dbb86049d0109ef4a7ab1ef6289e (diff)
downloadATCD-ba2488448b54975d2d00a398daab619acc8d5361.tar.gz
My Dog
Diffstat (limited to 'tests/Reactors_Test.cpp')
-rw-r--r--tests/Reactors_Test.cpp12
1 files changed, 10 insertions, 2 deletions
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;