summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-10-21 22:13:55 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-10-21 22:13:55 +0000
commitbee843e6cc0374bebe0c4aa1fe2b5f6f00f10cb6 (patch)
tree368483f16fe4f7ea4764e6670539c845d5ef6415 /examples
parent80449db12af08187ab51f94883b7b21a63b22d3d (diff)
downloadATCD-bee843e6cc0374bebe0c4aa1fe2b5f6f00f10cb6.tar.gz
ChangeLogTag:Sun Oct 21 12:50:39 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'examples')
-rw-r--r--examples/Reactor/WFMO_Reactor/test_window_messages.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/Reactor/WFMO_Reactor/test_window_messages.cpp b/examples/Reactor/WFMO_Reactor/test_window_messages.cpp
index 97adf78b460..beae4d3c3e5 100644
--- a/examples/Reactor/WFMO_Reactor/test_window_messages.cpp
+++ b/examples/Reactor/WFMO_Reactor/test_window_messages.cpp
@@ -1,5 +1,5 @@
// $Id$
-//
+
// ============================================================================
//
// = LIBRARY
@@ -15,7 +15,7 @@
//
// = AUTHOR
//
-// Irfan Pyarali
+// Irfan Pyarali <irfan@cs.wustl.edu>
//
// ============================================================================
@@ -44,7 +44,7 @@ Event_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *)
return 0;
}
-Event_Handler event_handler;
+static Event_Handler *global_event_handler;
void WINAPI
timer_callback (HWND hwnd,
@@ -54,7 +54,7 @@ timer_callback (HWND hwnd,
{
ACE_DEBUG ((LM_DEBUG, "(%t) timeout occured @ %d\n", dwTime));
- event_handler.handle_.signal ();
+ global_event_handler->handle_.signal ();
}
int
@@ -67,6 +67,9 @@ main (int argc, char** argv)
ACE_Reactor::instance (reactor.get ());
auto_ptr<ACE_Reactor_Impl> delete_impl (impl);
+ Event_Handler event_handler;
+ global_event_handler = &event_handler;
+
event_handler.iterations_ = 5;
int result = ACE_Reactor::instance ()->register_handler (&event_handler,
event_handler.handle_.handle ());