Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Timer_Queue / main_thread.cpp
blob120766ec74d89edf7f66652fc3072ec3c2290eba
2 //=============================================================================
3 /**
4 * @file main_thread.cpp
6 * Implements an threaded timer queue.
7 * This code exercises the Timer_Queue_Test_Driver class using
8 * threads.
10 * @author Douglas Schmidt <d.schmidt@vanderbilt.edu> && Sergio Flores-Gaitan <sergio@cs.wustl.edu>
12 //=============================================================================
14 #include "ace/OS_main.h"
15 #include "Driver.h"
16 #include "Thread_Timer_Queue_Test.h"
17 #include <memory>
19 typedef Timer_Queue_Test_Driver<Thread_Timer_Queue,
20 Input_Task,
21 Input_Task::ACTION>
22 THREAD_TIMER_QUEUE_TEST_DRIVER;
24 int
25 ACE_TMAIN (int, ACE_TCHAR *[])
27 // unique ptr ensures that the driver memory is released
28 // automatically.
29 THREAD_TIMER_QUEUE_TEST_DRIVER *tqtd;
30 ACE_NEW_RETURN (tqtd, Thread_Timer_Queue_Test_Driver, -1);
32 std::unique_ptr <THREAD_TIMER_QUEUE_TEST_DRIVER> driver (tqtd);
34 return driver->run_test ();