summaryrefslogtreecommitdiff
path: root/examples/Timer_Queue/main_async.cpp
diff options
context:
space:
mode:
authorsergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-19 01:00:12 +0000
committersergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-19 01:00:12 +0000
commit91d19b6b6362dbf60e2531c7ba02ab88ee0a7274 (patch)
tree226d09f921c3e747bf3933ddbc1d823a9f5c3ba4 /examples/Timer_Queue/main_async.cpp
parent5997714060f0ab18049d447b5faf476d022310e9 (diff)
downloadATCD-91d19b6b6362dbf60e2531c7ba02ab88ee0a7274.tar.gz
*** empty log message ***
Diffstat (limited to 'examples/Timer_Queue/main_async.cpp')
-rw-r--r--examples/Timer_Queue/main_async.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/Timer_Queue/main_async.cpp b/examples/Timer_Queue/main_async.cpp
new file mode 100644
index 00000000000..28af96ba0ee
--- /dev/null
+++ b/examples/Timer_Queue/main_async.cpp
@@ -0,0 +1,42 @@
+// ============================================================================
+//
+// = LIBRARY
+// examples
+//
+// = FILENAME
+// main_async.cpp
+//
+// = DESCRIPTION
+// Implements an asynchronous timer queue.
+// This code exercises the Timer_Queue_Test_Driver class using
+// signals as an asynchronous mechanism to dispatch events.
+//
+// = AUTHORS
+// Douglas Schmidt <schmidt@cs.wustl.edu> &&
+// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
+//
+// ============================================================================
+#include <ace/Auto_Ptr.h>
+
+#include "Driver.h"
+#include "Async_Timer_Queue_Test.h"
+
+typedef Timer_Queue_Test_Driver<Async_Timer_Queue*, Async_Timer_Queue>
+ ASYNC_TIMER_QUEUE_TEST_DRIVER;
+
+int
+main (int, char *[])
+{
+ // Auto ptr ensures that the driver memory is released automatically.
+ auto_ptr <ASYNC_TIMER_QUEUE_TEST_DRIVER> driver;
+ ASYNC_TIMER_QUEUE_TEST_DRIVER *tqtd;
+
+ ACE_NEW_RETURN (tqtd, Async_Timer_Queue_Test_Driver, -1);
+ driver = tqtd;
+
+ driver->run_test () ;
+ return 0 ;
+}
+
+
+